Baldi's Basics in Special Things Wiki
bbistwiki
https://bbist.miraheze.org/wiki/Main_Page
MediaWiki 1.40.2
first-letter
Media
Special
Talk
User
User talk
Baldi's Basics in Special Things Wiki
Baldi's Basics in Special Things Wiki talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Video
Video talk
Campaign
Campaign talk
TimedText
TimedText talk
Module
Module talk
Module:Reply to
828
69
135
2020-11-17T18:27:57Z
devwiki>BrandonWM
0
Created page with "local p = {} local function makeError(msg) msg ='Error in [[Template:Reply to]]: ' .. msg return mw.text.tag('strong', {['class']='error'}, msg) end function p.replyto(fra..."
Scribunto
text/plain
local p = {}
local function makeError(msg)
msg ='Error in [[Template:Reply to]]: ' .. msg
return mw.text.tag('strong', {['class']='error'}, msg)
end
function p.replyto(frame)
local origArgs = frame:getParent().args
local args = {}
local maxArg = 1
local usernames = 0
for k, v in pairs(origArgs) do
if type(k) == 'number' then
if mw.ustring.match(v,'%S') then
if k > maxArg then maxArg = k end
usernames = usernames + 1
local title = mw.title.new(v)
if not title then return makeError('Input contains forbidden characters.') end
args[k] = title.rootText
end
elseif v == '' and k:sub(0,5) == 'label' then
args[k] = '​'
else
args[k] = v
end
end
if usernames > (tonumber(frame.args.max) or 50) then
return makeError(string.format(
'More than %s names specified.',
tostring(frame.args.max or 50)
))
else
if usernames < 1 then
if frame.args.example then args[1] = frame.args.example else return makeError('Username not given.') end
end
args['label1'] = args['label1'] or args['label']
local isfirst = true
local outStr = args['prefix'] or '@'
for i = 1, maxArg do
if args[i] then
if isfirst then
isfirst = false
else
if ( (usernames > 2) or ((usernames == 2) and (args['c'] == '')) ) then outStr = outStr..', ' end
if i == maxArg then outStr = outStr..' '..(args['c'] or 'and') .. ' ' end
end
outStr = string.format(
'%s[[User:%s|%s]]',
outStr,
args[i],
args['label'..tostring(i)] or args[i]
)
end
end
outStr = outStr..(args['p'] or ':')
return mw.text.tag('span', {['class']='template-ping'}, outStr)
end
end
return p
14f0cd73a8a9f122c0e0e15382219083c602c62a
Template:Not done
10
77
151
2020-11-17T19:23:53Z
devwiki>MacFan4000
0
9 revisions imported from [[:templatewiki:Template:Not_done]]
wikitext
text/x-wiki
[[File:X mark.svg|18px]] '''{{{1|Not done}}}'''<noinclude>
{{documentation}}
[[Category:Resolution templates]]
</noinclude>
fd025e245bee74ddd6c5ae757f983a3cd3258d94
Template:Doing
10
82
161
2020-11-17T19:24:11Z
devwiki>MacFan4000
0
46 revisions imported from [[:templatewiki:Template:Doing]]
wikitext
text/x-wiki
[[File:Pictogram voting wait.svg|18px|link=|alt=]] '''{{{1|Doing…}}}'''<noinclude>
{{documentation}}
[[Category:Resolution templates]]
</noinclude>
eb1feacb3d7a14829c6a9be311732ee0d24d35f3
Category:Voting templates
14
32
61
2020-12-02T22:21:59Z
devwiki>BrandonWM
0
Created page with "Templates for casting votes. [[Category:Templates]]"
wikitext
text/x-wiki
Templates for casting votes.
[[Category:Templates]]
c1604198c4a29ffc2fd111116408c341df73f30b
Template:Clear
10
38
73
2022-03-08T14:12:32Z
devwiki>DarkMatterMan4500
0
Created page with "<div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude>"
wikitext
text/x-wiki
<div style="clear:{{{1|both}}};"></div><noinclude>
{{documentation}}
</noinclude>
38bab3e3d7fbd3d6800d46556e60bc6bac494d72
Template:Tq
10
72
141
2022-09-30T00:14:13Z
devwiki>Pppery
0
wikitext
text/x-wiki
#REDIRECT [[Template:Talk quote inline]]
f07470ea0200fa3540084bcca7efa9e7e929ba21
Template:Talk quote inline
10
44
85
2022-09-30T00:21:50Z
devwiki>Pppery
0
Oops
wikitext
text/x-wiki
<templatestyles src="Talk quote inline/styles.css" /><!--
--><q {{#if: {{{title|}}} | title="{{{title}}}"}} class="inline-quote-talk {{#if: {{{i|{{{italic|}}}}}} | inline-quote-talk-italic}} {{#if: {{{q|{{{quotes|}}}}}}|inline-quote-talk-marks}}">{{{1|Example text}}}</q><!--
--><noinclude>
{{Documentation}}
</noinclude>
b18e2fdc57277adbf4e3f4f513e78ecc5831453f
Template:Comment
10
80
157
2022-09-30T00:50:50Z
devwiki>Pppery
0
9 revisions imported from [[:meta:Template:Comment]]
wikitext
text/x-wiki
[[File:Pictogram voting comment.svg|18px|link=]] '''{{{1|Comment:}}}'''<noinclude>{{documentation}} [[Category:Resolution templates]]</noinclude>
5f48a21f6ec3dc6d82cfa7a668c9e00fec175396
Template:On hold
10
86
169
2022-09-30T01:06:11Z
devwiki>Pppery
0
Pppery moved page [[Template:On Hold]] to [[Template:On hold]]
wikitext
text/x-wiki
[[File:Symbol wait.svg|18px]] '''{{{1|On hold}}}'''<noinclude>[[Category:Resolution templates]]<noinclude>
{{documentation}}
[[Category:Resolution templates]]</noinclude>
7a18e8aa8c80a33b1a68eed60d0993a75202162f
Template:Tl
10
64
125
2022-09-30T01:09:19Z
devwiki>Pppery
0
Redirected page to [[Template:Template link]]
wikitext
text/x-wiki
#REDIRECT [[Template:Template link]]
fb9a6b420e13178e581af6e7d64274cd30a79017
Template:Template link
10
45
87
2022-09-30T01:10:00Z
devwiki>Pppery
0
46 revisions imported from [[:wikipedia:Template:Template_link]]
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
eabbec62efe3044a98ebb3ce9e7d4d43c222351d
Template:Abstain
10
97
189
2022-09-30T01:41:43Z
devwiki>Pppery
0
Add doc
wikitext
text/x-wiki
[[File:Symbol neutral vote.svg|18px]] '''<bdi>{{{1|Abstain}}}</bdi>'''<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
b1098b70832376165658562bfc8de5b6187bdb26
Template:Documentation
10
20
37
2022-09-30T01:43:37Z
devwiki>MacFan4000
0
4 revisions imported from [[:meta:Template:Documentation]]: this is useful and was on templateiwki
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude>
9885bb4fa99bf3d5b960e73606bbb8eed3026877
Template:User wikimedia
10
106
205
2022-09-30T01:44:10Z
devwiki>MacFan4000
0
9 revisions imported from [[:meta:Template:User_wikimedia]]: this is useful and was on templateiwki
wikitext
text/x-wiki
{{Userbox
| id = [[File:Wikimedia Foundation Logo.png|43px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has an [[metawikimedia:Special:CentralAuth/{{{account|{{BASEPAGENAME}}}}}|account]] at the Wikimedia Foundation projects.
| nocat = {{{nocat|}}}
| usercategory = Wikimedians
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
c7b06f2b4d088ee94d893eb1e3548e9e0562fc5e
Template:Neutral
10
98
191
2022-09-30T01:53:01Z
devwiki>Pppery
0
Add doc
wikitext
text/x-wiki
[[File:Symbol neutral vote.svg|18px]] '''<bdi>{{{1|Neutral}}}</bdi>'''<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
59552c46cb01ccf2c6196bdea9ec3eb90858e675
Template:Oppose
10
99
193
2022-09-30T01:54:33Z
devwiki>Pppery
0
Add doc
wikitext
text/x-wiki
{{ #switch: {{{4|{{{1|}}}}}}
| Regular= [[File:Symbol oppose vote.png|18px|alt=]]
| Normal= [[File:Symbol oppose vote.png|18px|alt=]]
| Strongly= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| Strong= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| Strongest = [[File:Symbol full oppose vote.svg|20px|alt=]]
| Weak= [[File:Weak Oppose.png|18px|alt=]]
| Weakly= [[File:Weak Oppose.png|18px|alt=]]
| strongly= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| strong= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| weak= [[File:Weak Oppose.png|18px|alt=]]
| weakly= [[File:Weak Oppose.png|18px|alt=]]
| strongest = [[File:Symbol full oppose vote.svg|20px|alt=]]
|#default= [[File:Symbol oppose vote.svg|18px|alt=]]
}} {{ #switch: {{{1|}}}
| Regular='''Oppose'''
| Normal= '''Oppose'''
| Strongest = '''Strongest oppose'''
| Strongly= '''Strongly oppose'''
| Strong= '''Strong oppose'''
| Weak= '''Weak oppose'''
| Weakly= '''Weakly oppose'''
| strongly= '''Strongly oppose'''
| strong= '''Strong oppose'''
| weak= '''Weak oppose'''
| weakly= '''Weakly oppose'''
| strongest = '''Strongest oppose'''
| {{{other|2}}} = '''{{{3}}}'''
|#default= '''Oppose'''
}}<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
8c57115a1c36446a717d2c874b2895b057d1ffc3
Template:Ping
10
43
83
2022-09-30T02:01:54Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{{{{|safesubst:}}}#invoke:Reply to|replyto|<noinclude>example=Example</noinclude>|max=50}}<noinclude>{{documentation}}</noinclude>
0a7b3547181e17a03ec99855e276688fcc36ce1e
Template:Support
10
78
153
2022-09-30T02:02:35Z
devwiki>Pppery
0
Add doc
wikitext
text/x-wiki
{{ #switch: {{{4|{{{1|}}}}}}
| Regular= [[File:Symbol support vote.svg|18px|alt=]]
| Normal= [[File:Symbol support vote.svg|18px|alt=]]
| Strongly= [[File:Symbol strong support vote.svg|18px|alt=]]
| Strongest= [[File:Symbol full support vote.svg|22px]]
| Strong= [[File:Symbol strong support vote.svg|18px|alt=]]
| Weak= [[File:Symbol partial support vote.svg|18px|alt=]]
| Weakly= [[File:Symbol partial support vote.svg|18px|alt=]]
| strongly= [[File:Symbol strong support vote.svg|18px|alt=]]
| strong= [[File:Symbol strong support vote.svg|18px|alt=]]
| weak= [[File:Symbol partial support vote.svg|18px|alt=]]
| weakly= [[File:Symbol partial support vote.svg|18px|alt=]]
|#default= [[File:Symbol support vote.svg|18px|alt=]]
}} {{ #switch: {{{1|}}}
| Regular='''Support'''
| Normal= '''Support'''
| Strongly= '''Strongly support'''
| Strong= '''Strong support'''
| Weak= '''Weak support'''
| Weakly= '''Weakly support'''
| strongly= '''Strongly support'''
| Strongest= '''''Strongest support'''''
| strong= '''Strong support'''
| weak= '''Weak support'''
| weakly= '''Weakly support'''
| {{{other|2}}} = '''{{{3}}}'''
|#default= '''Support'''
}}<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
0a43c05b804693f20b74446f7e7e6d7ccd10c516
Template:Tlx
10
65
127
2022-09-30T02:04:32Z
devwiki>Pppery
0
Redirected page to [[Template:Template link expanded]]
wikitext
text/x-wiki
#REDIRECT [[Template:Template link expanded]]
155e901040104f96908f1f4627c4eb3501301bf9
Template:=
10
37
71
2022-09-30T02:18:15Z
devwiki>Pppery
0
Replaced content with "=<noinclude> {{documentation}} </noinclude>"
wikitext
text/x-wiki
=<noinclude>
{{documentation}}
</noinclude>
44f3105df6073eb65369938814d1551b51611402
Template:User discord
10
101
197
2022-09-30T02:26:18Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Userbox
| id = #
| id-s = 24
| id-fc = #5865F2
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} chats on [[m:Discord|Discord]]{{#if:{{{account|}}}| as ''{{{account}}}''|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use Discord
}}<noinclude>{{Documentation}}[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
19b1d90000718152b9058c16c7c1ba13d7cb2715
Module:Arguments
828
22
41
2022-09-30T02:32:01Z
devwiki>Pppery
0
24 revisions imported from [[:wikipedia:Module:Arguments]]
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Module:Documentation
828
23
43
2022-09-30T02:36:08Z
devwiki>Pppery
0
Pppery moved page [[Module:Documentation/2]] to [[Module:Documentation]] without leaving a redirect
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
78cc3a78f2b5dbb267fa16027c0800a22dbd3c42
Module:Userbox
828
108
209
2022-09-30T13:34:01Z
devwiki>Pppery
0
Let's not use [[Module:Category handler]] and its dependency web here please
Scribunto
text/plain
-- This module implements {{userbox}}.
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function checkNum(val, default)
-- Checks whether a value is a number greater than or equal to zero. If so,
-- returns it as a number. If not, returns a default value.
val = tonumber(val)
if val and val >= 0 then
return val
else
return default
end
end
local function addSuffix(num, suffix)
-- Turns a number into a string and adds a suffix.
if num then
return tostring(num) .. suffix
else
return nil
end
end
local function checkNumAndAddSuffix(num, default, suffix)
-- Checks a value with checkNum and adds a suffix.
num = checkNum(num, default)
return addSuffix(num, suffix)
end
local function makeCat(cat, sort)
-- Makes a category link.
if sort then
return mw.ustring.format('[[Category:%s|%s]]', cat, sort)
else
return mw.ustring.format('[[Category:%s]]', cat)
end
end
--------------------------------------------------------------------------------
-- Argument processing
--------------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local origArgs = require('Module:Arguments').getArgs(frame)
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.main(funcName, args)
end
end
p.userbox = makeInvokeFunc('_userbox')
p['userbox-2'] = makeInvokeFunc('_userbox-2')
p['userbox-r'] = makeInvokeFunc('_userbox-r')
--------------------------------------------------------------------------------
-- Main functions
--------------------------------------------------------------------------------
function p.main(funcName, args)
local userboxData = p[funcName](args)
local userbox = p.render(userboxData)
local cats = p.categories(args)
return userbox .. (cats or '')
end
function p._userbox(args)
-- Does argument processing for {{userbox}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args[1] or args['border-c'] or args['id-c'] or '#999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee'
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt')
data.infoHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em'
data.infoColor = args['info-color'] or args['info-fc'] or 'black'
data.infoOtherParams = args['info-other-param'] or args['info-op']
data.infoClass = args['info-class']
-- Get id values.
local id = args.logo or args[3] or args.id
data.id = id
data.showId = id and true or false
data.idWidth = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.idBackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd'
data.idTextAlign = args['id-a'] or 'center'
data.idFontSize = checkNumAndAddSuffix(args['logo-size'] or args[5] or args['id-s'], 14, 'pt')
data.idColor = args['logo-color'] or args['id-fc'] or data.infoColor
data.idPadding = args['logo-padding'] or args['id-p'] or '0 1px 0 0'
data.idLineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em'
data.idOtherParams = args['logo-other-param'] or args['id-op']
data.idClass = args['id-class']
return data
end
p['_userbox-2'] = function (args)
-- Does argument processing for {{userbox-2}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args[9] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args[1] or args['border-c'] or args['id1-c'] or '#999999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args[2] or args['info-c'] or '#eeeeee'
-- Get info values.
data.info = args[4] or args.info or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-s'], 8, 'pt')
data.infoColor = args[8] or args['info-fc'] or 'black'
data.infoPadding = args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-lh'] or '1.25em'
data.infoOtherParams = args['info-op']
-- Get id values.
data.showId = true
data.id = args.logo or args[3] or args.id1 or 'id1'
data.idWidth = checkNumAndAddSuffix(args['id1-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['id-h'], 45, 'px')
data.idBackgroundColor = args[1] or args['id1-c'] or '#dddddd'
data.idTextAlign = 'center'
data.idFontSize = checkNumAndAddSuffix(args['id1-s'], 14, 'pt')
data.idLineHeight = args['id1-lh'] or '1.25em'
data.idColor = args['id1-fc'] or data.infoColor
data.idPadding = args['id1-p'] or '0 1px 0 0'
data.idOtherParams = args['id1-op']
-- Get id2 values.
data.showId2 = true
data.id2 = args.logo or args[5] or args.id2 or 'id2'
data.id2Width = checkNumAndAddSuffix(args['id2-w'], 45, 'px')
data.id2Height = data.idHeight
data.id2BackgroundColor = args[7] or args['id2-c'] or args[1] or '#dddddd'
data.id2TextAlign = 'center'
data.id2FontSize = checkNumAndAddSuffix(args['id2-s'], 14, 'pt')
data.id2LineHeight = args['id2-lh'] or '1.25em'
data.id2Color = args['id2-fc'] or data.infoColor
data.id2Padding = args['id2-p'] or '0 0 0 1px'
data.id2OtherParams = args['id2-op']
return data
end
p['_userbox-r'] = function (args)
-- Does argument processing for {{userbox-r}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args[1] or args['border-c'] or args['id-c'] or '#999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee'
-- Get id values.
data.showId = false -- We only show id2 in userbox-r.
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-align'] or args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt')
data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em'
data.infoColor = args['info-color'] or args['info-fc'] or 'black'
data.infoOtherParams = args['info-other-param'] or args['info-op']
-- Get id2 values.
data.showId2 = true
data.id2 = args.logo or args[3] or args.id or 'id'
data.id2Width = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px')
data.id2Height = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.id2BackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd'
data.id2TextAlign = args['id-a'] or 'center'
data.id2FontSize = checkNumAndAddSuffix(args['logo-size'] or args[5] or args['id-s'], 14, 'pt')
data.id2Color = args['logo-color'] or args['id-fc'] or data.infoColor
data.id2Padding = args['logo-padding'] or args['id-p'] or '0 0 0 1px'
data.id2LineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em'
data.id2OtherParams = args['logo-other-param'] or args['id-op']
return data
end
function p.render(data)
-- Renders the userbox html using the content of the data table.
-- Render the div tag html.
local root = mw.html.create('div')
root
:css('float', data.float)
:css('border', (data.borderWidth or '') .. ' solid ' .. (data.borderColor or ''))
:css('margin', '1px')
:css('width', data.width)
:addClass('wikipediauserbox')
:addClass(data.bodyClass)
-- Render the table tag html.
local tableroot = root:tag('table')
tableroot
:css('border-collapse', 'collapse')
:css('width', data.width)
:css('margin-bottom', '0')
:css('margin-top', '0')
:css('background', data.backgroundColor)
-- Render the id html.
local tablerow = tableroot:tag('tr')
if data.showId then
tablerow:tag('th')
:css('border', '0')
:css('width', data.idWidth)
:css('height', data.idHeight)
:css('background', data.idBackgroundColor)
:css('text-align', data.idTextAlign)
:css('font-size', data.idFontSize)
:css('color', data.idColor)
:css('padding', data.idPadding)
:css('line-height', data.idLineHeight)
:css('vertical-align', 'middle')
:cssText(data.idOtherParams)
:addClass(data.idClass)
:wikitext(data.id)
end
-- Render the info html.
tablerow:tag('td')
:css('border', '0')
:css('text-align', data.infoTextAlign)
:css('font-size', data.infoFontSize)
:css('padding', data.infoPadding)
:css('height', data.infoHeight)
:css('line-height', data.infoLineHeight)
:css('color', data.infoColor)
:css('vertical-align', 'middle')
:cssText(data.infoOtherParams)
:addClass(data.infoClass)
:wikitext(data.info)
-- Render the second id html.
if data.showId2 then
tablerow:tag('th')
:css('border', '0')
:css('width', data.id2Width)
:css('height', data.id2Height)
:css('background', data.id2BackgroundColor)
:css('text-align', data.id2TextAlign)
:css('font-size', data.id2FontSize)
:css('color', data.id2Color)
:css('padding', data.id2Padding)
:css('line-height', data.id2LineHeight)
:css('vertical-align', 'middle')
:cssText(data.id2OtherParams)
:wikitext(data.id2)
end
local title = mw.title.getCurrentTitle()
if (title.namespace == 2) and not title.text:match("/") then
return tostring(root) -- regular user page
elseif title.namespace == 14 then
return tostring(root) -- category
elseif title.isTalkPage then
return tostring(root) -- talk page
end
local function has_text(wikitext)
local function get_alt(text)
return text:match("|alt=([^|]*)") or ""
end
wikitext = wikitext:gsub("]]", "|]]")
wikitext = wikitext:gsub("%[%[%s*[Mm][Ee][Dd][Ii][Aa]%s*:[^|]-(|.-)]]", get_alt)
wikitext = wikitext:gsub("%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:[^|]-(|.-)]]", get_alt)
wikitext = wikitext:gsub("%[%[%s*[Ff][Ii][Ll][Ee]%s*:[^|]-(|.-)]]", get_alt)
return mw.text.trim(wikitext) ~= ""
end
return tostring(root)
end
function p.categories(args, page)
-- Gets categories
-- The page parameter makes the function act as though the module was being called from that page.
-- It is included for testing purposes.
local cats = {}
cats[#cats + 1] = args.usercategory
cats[#cats + 1] = args.usercategory2
cats[#cats + 1] = args.usercategory3
if #cats > 0 and not require("Module:Yesno")(args.nocat) then
-- Get the title object
local title
if page then
title = mw.title.new(page)
else
title = mw.title.getCurrentTitle()
end
-- Build category handler arguments.
local chargs = {}
chargs.page = page
chargs.main = '[[Category:Pages with misplaced templates]]'
if title.namespace == 2 then
-- User namespace.
local user = ''
for i, cat in ipairs(cats) do
user = user .. makeCat(cat)
end
return user
elseif title.namespace == 10 then
-- Template namespace.
local basepage = title.baseText
local template = ''
for i, cat in ipairs(cats) do
template = template .. makeCat(cat, ' ' .. basepage)
end
return template
end
end
end
return p
aac333efff739f0243d8ffced6f4296cffb8d7e9
Template:Infobox
10
26
49
2022-09-30T14:45:57Z
devwiki>Pppery
0
Copy from Wikipedia
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<noinclude>
{{documentation}}
</noinclude>
627ee6fcf4d4f108fe054b5c476201cad0ed7717
Module:Infobox
828
27
51
2022-09-30T14:52:23Z
devwiki>Pppery
0
Scribunto
text/plain
--
-- This module implements {{Infobox}}
--
local p = {}
local args = {}
local origArgs = {}
local root
local function notempty( s ) return s and s:match( '%S' ) end
local function fixChildBoxes(sval, tt)
if notempty(sval) then
local marker = '<span class=special_infobox_marker>'
local s = sval
s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker)
if s:match(marker) then
s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1')
s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
end
if s:match(marker) then
local subcells = mw.text.split(s, marker)
s = ''
for k = 1, #subcells do
if k == 1 then
s = s .. subcells[k] .. '</' .. tt .. '></tr>'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
return sval
end
end
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
local vals = {}
for k, v in pairs(t1) do
vals[v] = true
end
for k, v in pairs(t2) do
vals[v] = true
end
local ret = {}
for k, v in pairs(vals) do
table.insert(ret, k)
end
return ret
end
local function getArgNums(prefix)
-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'data', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local nums = {}
for k, v in pairs(args) do
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
if num then table.insert(nums, tonumber(num)) end
end
table.sort(nums)
return nums
end
local function addRow(rowArgs)
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:attr('id', rowArgs.rowid)
:tag('th')
:attr('colspan', 2)
:attr('id', rowArgs.headerid)
:addClass(rowArgs.class)
:addClass(args.headerclass)
:css('text-align', 'center')
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
elseif rowArgs.data then
if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
rowArgs.rowstyle = 'display:none'
end
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
row:attr('id', rowArgs.rowid)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:attr('id', rowArgs.labelid)
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
if not rowArgs.label then
dataCell
:attr('colspan', 2)
:css('text-align', 'center')
end
dataCell
:attr('id', rowArgs.dataid)
:addClass(rowArgs.class)
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
end
local function renderTitle()
if not args.title then return end
root
:tag('caption')
:addClass(args.titleclass)
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
root
:tag('tr')
:tag('th')
:attr('colspan', 2)
:addClass(args.aboveclass)
:css('text-align', 'center')
:css('font-size', '125%')
:css('font-weight', 'bold')
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass(args.belowclass)
:css('text-align', 'center')
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderSubheaders()
if args.subheader then
args.subheader1 = args.subheader
end
if args.subheaderrowclass then
args.subheaderrowclass1 = args.subheaderrowclass
end
local subheadernums = getArgNums('subheader')
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function renderImages()
if args.image then
args.image1 = args.image
end
if args.caption then
args.caption1 = args.caption
end
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = mw.html.create():wikitext(args['image' .. tostring(num)])
if caption then
data
:tag('div')
:cssText(args.captionstyle)
:wikitext(caption)
end
addRow({
data = tostring(data),
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
local function preprocessRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
local lastheader
for k, num in ipairs(rownums) do
if args['header' .. tostring(num)] then
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
lastheader = num
elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
local function renderRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)],
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)],
dataid = args['dataid' .. tostring(num)],
labelid = args['labelid' .. tostring(num)],
headerid = args['headerid' .. tostring(num)],
rowid = args['rowid' .. tostring(num)]
})
end
end
local function renderItalicTitle()
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
local function _infobox()
-- Specify the overall layout of the infobox, with special settings
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass((args.subbox ~= 'yes') and 'infobox' or nil)
:addClass(args.bodyclass)
if args.subbox == 'yes' then
root
:css('padding', '0')
:css('border', 'none')
:css('margin', '-3px')
:css('width', 'auto')
:css('min-width', '100%')
:css('font-size', '100%')
:css('clear', 'none')
:css('float', 'none')
:css('background-color', 'transparent')
else
root
:css('width', '22em')
end
root
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
renderSubheaders()
renderImages()
if args.autoheaders then
preprocessRows()
end
renderRows()
renderBelowRow()
renderItalicTitle()
return tostring(root)
end
local function preprocessSingleArg(argName)
-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
local function preprocessArgs(prefixTable, step)
-- Assign the parameters with the given prefixes to the args table, in order, in batches
-- of the step size specified. This is to prevent references etc. from appearing in the
-- wrong order. The prefixTable should be an array containing tables, each of which has
-- two possible fields, a "prefix" string and a "depend" table. The function always parses
-- parameters containing the "prefix" string, but only parses parameters in the "depend"
-- table if the prefix parameter is present and non-blank.
if type(prefixTable) ~= 'table' then
error("Non-table value detected for the prefix table", 2)
end
if type(step) ~= 'number' then
error("Invalid step value detected", 2)
end
-- Get arguments without a number suffix, and check for bad input.
for i,v in ipairs(prefixTable) do
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
error('Invalid input detected to preprocessArgs prefix table', 2)
end
preprocessSingleArg(v.prefix)
-- Only parse the depend parameter if the prefix parameter is present and not blank.
if args[v.prefix] and v.depend then
for j, dependValue in ipairs(v.depend) do
if type(dependValue) ~= 'string' then
error('Invalid "depend" parameter value detected in preprocessArgs')
end
preprocessSingleArg(dependValue)
end
end
end
-- Get arguments with number suffixes.
local a = 1 -- Counter variable.
local moreArgumentsExist = true
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a + step - 1 do
for j,v in ipairs(prefixTable) do
local prefixArgName = v.prefix .. tostring(i)
if origArgs[prefixArgName] then
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
preprocessSingleArg(prefixArgName)
end
-- Process the depend table if the prefix argument is present and not blank, or
-- we are processing "prefix1" and "prefix" is present and not blank, and
-- if the depend table is present.
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
for j,dependValue in ipairs(v.depend) do
local dependArgName = dependValue .. tostring(i)
preprocessSingleArg(dependArgName)
end
end
end
end
a = a + step
end
end
local function parseDataParameters()
-- Parse the data parameters in the same order that the old {{infobox}} did, so that
-- references etc. will display in the expected places. Parameters that depend on
-- another parameter are only processed if that parameter is present, to avoid
-- phantom references appearing in article reference lists.
preprocessSingleArg('autoheaders')
preprocessSingleArg('child')
preprocessSingleArg('bodyclass')
preprocessSingleArg('subbox')
preprocessSingleArg('bodystyle')
preprocessSingleArg('title')
preprocessSingleArg('titleclass')
preprocessSingleArg('titlestyle')
preprocessSingleArg('above')
preprocessSingleArg('aboveclass')
preprocessSingleArg('abovestyle')
preprocessArgs({
{prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
}, 10)
preprocessSingleArg('subheaderstyle')
preprocessSingleArg('subheaderclass')
preprocessArgs({
{prefix = 'image', depend = {'caption', 'imagerowclass'}}
}, 10)
preprocessSingleArg('captionstyle')
preprocessSingleArg('imagestyle')
preprocessSingleArg('imageclass')
preprocessArgs({
{prefix = 'header'},
{prefix = 'data', depend = {'label'}},
{prefix = 'rowclass'},
{prefix = 'rowstyle'},
{prefix = 'rowcellstyle'},
{prefix = 'class'},
{prefix = 'dataid'},
{prefix = 'labelid'},
{prefix = 'headerid'},
{prefix = 'rowid'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
preprocessSingleArg('decat')
end
function p.infobox(frame)
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
function p.infoboxTemplate(frame)
-- For calling via #invoke within a template
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p
c6ac51f9e2faf9c2f3aba1fb8c05af98db47f4d4
Template:Utc
10
49
95
2022-09-30T16:16:46Z
devwiki>Pppery
0
36 revisions imported from [[:wikipedia:Template:Utc]]
wikitext
text/x-wiki
{{#time:H:i|{{#expr:{{{1|0}}} * 60 + {{{2|0}}} round 0}} minutes}}<noinclude>
{{documentation}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>
d24309676bfe4692d038657a7171952e7d1cded7
Template:Template link expanded
10
46
89
2022-09-30T18:48:13Z
devwiki>Pppery
0
wikitext
text/x-wiki
<code><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!--
-->[[{{{sister|{{{SISTER|}}}}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
-->{{#if:{{{2|}}} ||{{{2}}}}}<!--
-->{{#if:{{{3|}}} ||{{{3}}}}}<!--
-->{{#if:{{{4|}}} ||{{{4}}}}}<!--
-->{{#if:{{{5|}}} ||{{{5}}}}}<!--
-->{{#if:{{{6|}}} ||{{{6}}}}}<!--
-->{{#if:{{{7|}}} ||{{{7}}}}}<!--
-->{{#if:{{{8|}}} ||{{{8}}}}}<!--
-->{{#if:{{{9|}}} ||{{{9}}}}}<!--
-->{{#if:{{{10|}}} ||{{{10}}}}}<!--
-->{{#if:{{{11|}}} ||{{{11}}}}}<!--
-->{{#if:{{{12|}}} ||{{{12}}}}}<!--
-->{{#if:{{{13|}}} ||{{{13}}}}}<!--
-->{{#if:{{{14|}}} ||{{{14}}}}}<!--
-->{{#if:{{{15|}}} ||{{{15}}}}}<!--
-->{{#if:{{{16|}}} ||{{{16}}}}}<!--
-->{{#if:{{{17|}}} ||{{{17}}}}}<!--
-->{{#if:{{{18|}}} ||{{{18}}}}}<!--
-->{{#if:{{{19|}}} ||{{{19}}}}}<!--
-->{{#if:{{{20|}}} ||{{{20}}}}}<!--
-->{{#if:{{{21|}}} ||''...''}}<!--
--><nowiki>}}</nowiki></code><noinclude>
{{Documentation}}
</noinclude>
9f670205d4b358df089b1a820f78f02a88afca3a
Template:User instagram
10
104
201
2022-10-01T17:13:01Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Userbox
| id = [[File:Instagram icon.png|37px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has an {{#if:{{{account|}}}| account [https://instagram.com/{{{account}}} '''@{{{account}}}''']|account}} on Instagram.
| nocat = {{{nocat|}}}
| usercategory = Users who use Instagram
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
1178ad0721de804c08dd554ebb4b52c4c6569fde
Template:User IRC
10
100
195
2022-10-01T17:13:23Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Userbox
| id = #
| id-s = 24
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} chats on [[m:IRC|IRC]]{{#if:{{{nick|}}}| as ''{{{nick}}}''|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use IRC
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
a148152ff16bb6fc7f7a7bd46c4898b50f1996fc
Module:Yesno
828
96
187
2022-10-01T17:25:37Z
devwiki>Pppery
0
Pppery moved page [[Module:Yesno/2]] to [[Module:Yesno]] without leaving a redirect
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
f767643e7d12126d020d88d662a3dd057817b9dc
Module:No globals
828
116
225
2022-10-01T17:28:48Z
devwiki>Pppery
0
Pppery moved page [[Module:No globals/2]] to [[Module:No globals]] without leaving a redirect
Scribunto
text/plain
local mt = getmetatable(_G) or {}
function mt.__index (t, k)
if k ~= 'arg' then
error('Tried to read nil global ' .. tostring(k), 2)
end
return nil
end
function mt.__newindex(t, k, v)
if k ~= 'arg' then
error('Tried to write global ' .. tostring(k), 2)
end
rawset(t, k, v)
end
setmetatable(_G, mt)
8ce3969f7d53b08bd00dabe4cc9780bc6afd412a
Module:Documentation/config
828
24
45
2022-10-01T17:37:53Z
devwiki>Pppery
0
Pppery moved page [[Module:Documentation/config/2]] to [[Module:Documentation/config]] without leaving a redirect
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
d70e8b1402a2bbe08a1fef4b75d743e661af0c95
Template:Documentation subpage
10
21
39
2022-10-01T17:51:17Z
devwiki>Pppery
0
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
471e685c1c643a5c6272e20e49824fffebad0448
Template:User youtube
10
107
207
2022-10-02T01:37:31Z
devwiki>Tali64³
0
Made social media template for YouTube
wikitext
text/x-wiki
{{Userbox
| id = [[File:YouTube full-color icon (2017).svg|37px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has a YouTube channel{{#if:{{{account|}}}| at [https://{{{account}}} '''{{{account}}}''']|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use YouTube
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
f0ba1080f2a2d69494317a9790fa3d7e6e4239b4
Template:User github
10
102
199
2022-10-04T16:14:11Z
devwiki>MirahezeGDPR a51581232c7cc84ec1a32c40d8489548
0
More consistent with other userboxes + this is only supposed to be for accounts
wikitext
text/x-wiki
{{Userbox
| id = [[File:GitLogo.png|43px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has an account on GitHub{{#if:{{{account|}}}| as ''[[github:{{{account}}}|{{{account}}}]]''|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use GitHub
}}<noinclude>{{Documentation}}[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
08ef531d5b5a1e69b84939e0fc1f1d0d622f38ad
Category:Notice templates
14
33
63
2022-10-05T20:53:22Z
devwiki>Pppery
0
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Category:Resolution templates
14
34
65
2022-10-05T20:57:10Z
devwiki>Pppery
0
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Category:Social media userboxes
14
35
67
2022-10-05T20:57:21Z
devwiki>Pppery
0
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Category:License templates
14
36
69
2022-10-05T20:58:07Z
devwiki>Pppery
0
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Template:Clear/doc
10
67
131
2022-10-05T21:15:43Z
devwiki>Pppery
0
<includeonly>[[Category:Templates]]</includeonly>
wikitext
text/x-wiki
{{Documentation subpage}}
== Description ==
This template makes content wait until existing content is completed in all columns. It is often used to prevent text from flowing next to unrelated images.
== Usage ==
* {{tlx|clear}} — adds <code><div style="clear:both;"></div></code>
* {{tlx|clear|left}} — adds <code><div style="clear:left;"></div></code>
* {{tlx|clear|right}} — adds <code><div style="clear:right;"></div></code>
== Examples ==
<div style="border: 1px solid black; background: #fde; padding: 1em; margin: 2em;">
=== Example without {{tl|clear}} ===
[[File:HeidelbergTun.jpg|200px|left]]
Lorem ipsum dolor sit amet
==== New section without template ====
Without {{tl|clear}}, this section starts at the right of the image.
{{clear}}
</div>
<div style="border: 1px solid black; background: #fde; padding: 1em; margin: 2em;">
=== Example that uses {{tl|clear}} ===
[[File:HeidelbergTun.jpg|200px|left]]
Lorem ipsum dolor sit amet<br/>
'''{{tl|clear}}'''
{{clear}}
==== New section with template ====
{{tl|clear}} placed before this section, so it appears below the image.
</div>
== TemplateData ==
<templatedata>{
"description": "Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images, so text will appear on a full width line under the image.",
"params": {
"1": {
"label": "Side",
"description": "Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.",
"type": "line",
"required": false,
"suggestedvalues": [
"right",
"left",
"both"
]
}
},
"format": "inline"
}</templatedata>
<includeonly>[[Category:Templates]]</includeonly>
58226a453dd4b97c96cfce56dd0251c877f7019e
Template:Hatnote
10
42
81
2022-10-05T21:18:12Z
devwiki>Pppery
0
Category
wikitext
text/x-wiki
<div style="margin-left:2em; margin-right: 2em;>''{{{1}}}''</div>
<!-- The wikipedia templates uses :, which generated dd and dt tags. That is not ideal for accessibility. --><noinclude>
This is a general purpose template for all kind of [https://en.wikipedia.org/wiki/Wikipedia:Hatnote hatnotes]. '''Hatnotes''' are a small annotation above a page or a section that can help the reader navigate. It's used for example to clarify what a section is about and link to other pages the reader may want to read.
== Example usage ==
<pre><nowiki>
=== Heading ===
{{hatnote|This section is about headings in text, for the human body part see [[Head|Head]]. <br> For the the first level heading see the main article [[Headline]].</br> H1 redirects here, for the car see [[Hyundai#H1|Hyundai H1]].}}
The first sentence of the section is here.
</nowiki></pre>
=== Heading ===
{{hatnote|This section is about headings in text, for the human body part see [[Head|Head]]. <br> For the the first level heading see the main article [[Headline]].</br> H1 redirects here, for the car see [[Hyundai#H1|Hyundai H1]].}}
The first sentence of the section is here.
<templatedata>
{
"params": {
"1": {
"label": "content",
"description": "the content of the note",
"example": "For the xxx see [[yyy]]."
}
},
"description": "Adds a annotation for the reader about the content that follows. Usually used after a heading."
}
</templatedata>
[[Category:Templates]]
</noinclude>
5e58f83d6fa53ed06f85139184aff1d651804efe
Template:Ping/doc
10
70
137
2022-10-05T21:20:26Z
devwiki>Pppery
0
Categorize
wikitext
text/x-wiki
{{Documentation subpage}}
This template is used to link one or more users' names, in the form "<kbd>@Username:</kbd>", to trigger a [[mw:Notifications|notification]] for user(s) you are replying to in a discussion. The notification will work successfully only if you sign your post in the same edit in which you use this template. It works on any talk page or Project namespace page.
'''You cannot directly type the "@" symbol to notify a user of your reply, you must use the template documented here or manually create a [[w:WP:WIKILINK|wikilink]] to their [[w:WP:USERPAGE|user page]].<br /> The "@" symbol is used by this template for display purposes only.'''
This template is particularly helpful in discussions that are not threaded, to indicate which user's comment is referenced. If you feel that this template unnecessarily personalizes the discussion, you may still post on the user's talk page to indicate that you have replied to a comment. IP addresses are only notified if you post to their user talk page.
==Usage==
{| class="wikitable"
!Template !! Result
|-
|{{tlx|ping|Example}} || {{ping|Example}}
|-
|{{tlx|ping|Example|John}} || {{ping|Example|John}}
|}
=== Single recipient ===
Use the following syntax:
<nowiki>{{ping|Username}} Message text. ~~~~</nowiki>
For example, <code>{{tlx|ping|Example}}</code> generates "@[[User:Example|Example]]:" and notifies [[User:Example|Example]]
=== Multiple recipient ===
You can reply to up to 50 people at once. Use the following syntax:
<nowiki>{{ping|User1|User2|User3|User4|User5|User6|User7|User8|User9|User10|...}} Message text. ~~~~</nowiki>
For example, <code><nowiki>{{ping|Example|John}}</nowiki></code> will produce:
{{ping|Example|John}}
[[File:Ambox warning pn.svg|20px|link=|alt=⚠]] '''<span style="color:red;">''Warning:''</span> If the total number of detected to-be-pinged users in an edit exceeds 50, no notifications will be delivered.''' This is a software limit, and applies to the entire edit, even if the mentions are split between multiple templates. If you need to ping more than 50 users, it will need to be spread across multiple edits, and each edit needs to add new lines and be signed by you.
__NOTOC__
<includeonly>[[Category:Templates]]</includeonly>
7a73b565aafb50107950839672dc3bf51b8597c5
Template:Talk quote inline/doc
10
73
143
2022-10-05T21:23:01Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{documentation subpage}}
== Usage ==
Template {{tlx|talk quote inline}} (aka {{tl|tq}}) is used on talk pages to highlight a short excerpt of quoted material from elsewhere
By default, the template changes the given text to {{tq|serif typeface and green color}}. The accompanying change in typeface to a serif (roman) or italic type style ({{tq|i=y|example text}}) is to make it fully accessible for those readers with red/ green color blindness.
===Parameters===
<nowiki>1=</nowiki> The text to highlight with the template. As with all templates, when the text, given as the template parameter, contains an equals character (<code>=</code>), prefixing the text with <nowiki>1=</nowiki> is required to ensure the character is correctly interpreted as being part of the normal text; otherwise it will break the template.
<nowiki>italic=yes</nowiki> or <nowiki>i=yes</nowiki> will force the content to be {{tq|i=y|green and italicised only}} (no change to serif font style); any value may be used, e.g. <nowiki>i=y</nowiki>. This is typically used inside a block of text that is already serif-styled to make the highlighted text stand out better.
<nowiki>|title=</nowiki> takes text, which cannot be marked up in any way, and displays it as a pop-up "tooltip" (in most browsers) when the cursor hovers over the span. The most common use of this is to provide attribution.
<nowiki>|q=yes</nowiki> or <nowiki>|quotes=yes</nowiki> adds quotation marks around the colored text.
=== Examples ===
; What you write:
: <code><nowiki>...when you said, {{tq|Lorem ipsum '''dolor''' sit}}, and, {{tq|consectetur adipiscing elit|i=yes|title=This is a tooltip}}.</nowiki></code>
; What you get:
: ...when you said, {{tq|Lorem ipsum '''dolor''' sit}}, and, {{tq|consectetur adipiscing elit|i=yes|title=This is a tooltip}}.
; What you write:
: <code><nowiki>...when you said, {{tq|Lorem ipsum '''dolor''' sit|q=yes}}, and, {{tq|consectetur adipiscing elit|q=yes|i=yes|title=This is a tooltip}}.</nowiki></code>
; What you get:
: ...when you said, {{tq|Lorem ipsum '''dolor''' sit|q=yes}}, and, {{tq|consectetur adipiscing elit|q=yes|i=yes|title=This is a tooltip}}.
(Run your mouse over the words "consectetur adipiscing elit" and in a second you will see a tooltip pop up next to the mouse cursor which says, "This is a tooltip".)
== TemplateData ==
<templatedata>
{
"params": {
"1": {
"label": "Text",
"description": "Text to highlight",
"type": "content",
"required": true
},
"title": {
"label": "Title",
"description": "Takes text, which cannot be marked up in any way, and displays it as a pop-up \"tooltip\" (in most browsers) when the cursor hovers over the span. The most common use of this is to provide attribution.",
"type": "string"
},
"italic": {
"aliases": [
"i"
],
"label": "Italic?",
"description": "Makes the content italicised and the same san-serif font as normal text",
"type": "boolean"
},
"quotes": {
"aliases": [
"q"
],
"label": "Quotes?",
"description": "Adds quotation marks around the colored text",
"type": "boolean"
}
},
"description": "Highlights a short excerpt of quoted material of other editors' comments or from an article or source"
}
</templatedata>
<includeonly>[[Category:Templates]]</includeonly>
e6ac7dd0b665c769e13dbc1f0f2a03d35f8bd9d4
Template:Template link/doc
10
74
145
2022-10-05T21:23:23Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->
The '''template link''' (or "tl") template is a simple [[w:Macro (computer science)|macro]] [[m:Help:template|template]] used to display a template name as a link surrounded by braces, thus showing the template name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a template by name without invoking it.
==Examples==
An example of its use is:
::<code><nowiki>{{tl|Example}}</nowiki></code>
:which generates
::{{tl|Example}}
== TemplateData ==
<templatedata>{
"description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.",
"params": {
"1": {
"label": "template name",
"description": "positional parameter: the template name without the namespace prefix “Template:”, which is added automatically",
"type": "wiki-template-name",
"required": true
}
}
}</templatedata>
== See also ==
* {{tl|tlx}} to produce a [t]emplate [l]ink with an e[x]panded number of parameters.
<includeonly>[[Category:Templates]]</includeonly>
ca1918b14339b6bc271b9443e50b876de6a02c3d
Template:Template link expanded/doc
10
75
147
2022-10-05T21:23:34Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
This template is used to show example template usage without expanding the template itself.
==Basic use==
''(Note: In the following examples, [[w:Ellipsis|ellipses (groups of three dots)]] indicate where parameters have been omitted.)''
: {{tlx||tlx|Template|''first parameter''|''second parameter''|''third parameter''|...|''tenth parameter''}} produces: {{tlx|Template|''first parameter''|''second parameter''|''third parameter''|...|''tenth parameter''}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use {{tlx|{{=}}}}, like so:
: {{tlx|tlx|Template|''first''<nowiki>{{=}}</nowiki>''first value''|''second''|''third''<nowiki>{{=}}</nowiki>''third value''}} produces: {{tlx{|Template|''firstfirst value''|''second''|''third{{=}}third value''}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki> tags. When you do, you don't need to replace equals-signs. For instance:
: {{tlx|tlx|Template|<nowiki><nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki></nowiki>}} produces: {{tlx|Template|<nowiki>first|second|third=value|...|999th</nowiki>}}
==Purpose and naming==
Mnemonically, ''template link expanded'' (after ''[[Template:tl|template link]]'').
This template allows an example of calling a template, accompanied by one or more parameters to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in <code>&#124;</code>. A keyword parameter can be used with equals code &#61; or <nowiki>{{=}}</nowiki> or in nowiki-text: <code><nowiki>content=size=10</code>" or all parameters as a string in <nowiki> tags. If you use 21 or more parameters, all after the 20th will be replaced with a single <code><nowiki>|...</nowiki></code> at the end of the parameter list.
; Exceptions
If the intended template lists numerous parameters, then perhaps this template should really not be used, and just hardcode the usage with <code><nowiki>. For example:
: <code><code><nowiki&ht;<nowiki>{{Anytemplate|arg1=23|size=250px|</nowiki><var>other parameters...</var><nowiki>}}</nowiki></nowiki></code></code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>
===Parameters===
*If the only parameter supplied is the template's name, {{tlx|tlx}}'s output is the same as {{tlx|tl}} – i.e. a link within [[w:Braces (punctuation)|braces]] – but in a [[w:monospaced font|monospaced font]]:
**{{tlx|tl|tl}} produces: {{tl|tl}}
**{{tlx|tlx|tl}} produces: {{tlx|tl}}
: {{tlx|tl}} will also not take nor display additional parameters.
; Named parameters
<nowiki>|subst=</nowiki>
: Setting this parameter to any non-blank value will prefix the string <code>subst:</code> linked to [[Help:Substitution]]. This is useful to indicate when a template should be substituted. For example, {{tlx|tlx|Welcome|3=subst=Y}} produces: {{tlx|Welcome|subst=Y}}.
<nowiki>|SISTER=</nowiki>
: For an interwiki link to [[w:H:IW|other sister projects]], such as: <code><nowiki>SISTER=M:</nowiki></code> ([[m:|Meta]]), facilitating interwiki template documentation and/or discussion.
==Documentation==
{{tl|Tlx}} is a generalization of {{tl|tl|x}} with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "'''{'''", "''|'''", "'''}'''" and links can be hard to read when not monospaced.
===Usage===
:<code>{{tlx{{!}}Templatename}}</code>
:<code>{{tlx{{!}}Templatename{{!}}param}}</code>
:<code>{{tlx{{!}}Templatename{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10}}</code>
:<code>{{tlx{{!}}Templatename{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10&#124;more}}</code>
:<code>{{tlx{{!}}Templatename{{!}}param&#61;value}}</code>
There are up to 10 placeholders for parameters of the specified template.
==TemplateData==
<templatedata>
{
"params": {
"1": {
"label": "Template name",
"description": "Name of the template to link.",
"example": "Tlx",
"type": "wiki-template-name",
"required": true
},
"2": {
"label": "1st parameter",
"type": "string"
},
"3": {
"label": "2nd parameter",
"type": "string"
},
"4": {
"label": "3rd parameter",
"type": "string"
},
"5": {
"label": "4th parameter",
"type": "string"
},
"6": {
"label": "5th parameter",
"type": "string"
},
"7": {
"label": "6th parameter",
"type": "string"
},
"8": {
"label": "7th parameter",
"type": "string"
},
"9": {
"label": "8th parameter",
"type": "string"
},
"10": {
"label": "9th parameter",
"type": "string"
},
"11": {
"label": "10th parameter",
"type": "string"
},
"12": {
"label": "11th parameter",
"type": "string"
},
"13": {
"label": "12th parameter",
"type": "string"
},
"14": {
"label": "13th parameter",
"type": "string"
},
"15": {
"label": "14th parameter",
"type": "string"
},
"16": {
"label": "15th parameter",
"type": "string"
},
"17": {
"label": "16th parameter",
"type": "string"
},
"18": {
"label": "17th parameter",
"type": "string"
},
"19": {
"label": "18th parameter",
"type": "string"
},
"20": {
"label": "19th parameter",
"type": "string"
},
"21": {
"label": "20th parameter",
"type": "string"
},
"subst": {
"description": "Set to any value to show \"subst:\" before the template name",
"example": "true",
"type": "boolean",
"label": "Show subst:"
},
"LANG": {
"label": "Language",
"description": "The prefix for a link to Wikipedias in other languages.",
"example": "de:",
"type": "line"
},
"SISTER": {
"description": "The prefix for an interwiki link to other sister projects",
"example": "M:",
"type": "line",
"label": "Sister project"
}
},
"description": "Show example template usage without expanding the template itself. {{tnull}} is similar without linking the template.",
"paramOrder": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"subst",
"LANG",
"SISTER"
],
"format": "inline"
}
</templatedata>
<includeonly>[[Category:Templates]]</includeonly>
a578d758a00a0dd445a37710f39bb01ad96758dd
Template:Userbox
10
48
93
2022-10-05T21:25:59Z
devwiki>Pppery
0
Already on doc
wikitext
text/x-wiki
{{#invoke:userbox|userbox}}<noinclude>{{documentation}}</noinclude>
6813e8e31cadc62df2379b5fae9ea23c23f29e97
Template:Utc/doc
10
110
213
2022-10-05T21:26:16Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
{{tl|{{PAGENAME}}}} takes the current [[w:UTC|UTC]] time from the server, and applies an optional time offset in hours (or hours and minutes). It returns the computed local time in 24-hour format (''hh:mm'').
; Syntax<nowiki>:</nowiki>
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>''[hours]''<nowiki>|</nowiki>''[minutes]''<nowiki>}}</nowiki></code>
* The ''hours'' parameter (optional, default 0) is normally negative for America and West Pacific, it is null or positive in Europe, Africa, Asia and East Pacific.
* The ''minutes'' parameter (optional, default 0) is null for most timezones, but 30 minutes occur in some places, sometimes because of daylight. Use negative values for western timezones that need it.
* Non integer are accepted for both parameters, but this will be typically used only for ''hours'' offsets from UTC.
; Examples<nowiki>:</nowiki>
: <code><nowiki>{{</nowiki>Utc<nowiki>}}</nowiki></code> = "{{Utc}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>-4<nowiki>}}</nowiki></code> = "{{Utc|-4}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>2<nowiki>}}</nowiki></code> = "{{Utc|2}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>6.5<nowiki>}}</nowiki></code> = "{{Utc|6.5}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>6<nowiki>|</nowiki>30<nowiki>}}</nowiki></code> = "{{Utc|6|30}}".
<includeonly>[[Category:Templates]]</includeonly>
f3acbbecf14857a9af608e27a0a52aea42ed9999
Template:Welcome
10
50
97
2022-10-05T21:26:43Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#ifeq:{{{header}}}|no||== Welcome to Miraheze ==}}
{{{hello|Hello, <includeonly>{{subst:BASEPAGENAME}}</includeonly>, and welcome to {{<includeonly>safesubst:</includeonly>SITENAME}}!}}}
For more information, please see the Miraheze [[meta:FAQ|FAQ]] on Meta Wiki. If you have any additional questions, concerns, or comments, please feel free to see Meta Wiki's [[meta:Help center|help center]]. Local wiki assistance may be available at [[Help:Contents]].
You are encouraged to create your user page, whether here on {{<includeonly>safesubst:</includeonly>SITENAME}} (visible only when on {{<includeonly>safesubst:</includeonly>SITENAME}}, or your [[mw:Extension:GlobalUserPage|global user page]] that visible on ''any'' Miraheze wiki where a user '''''does not''''' have a local user page and provided that the wiki has the [[mw:Extension:GlobalUserPage|GlobalUserPage]] extension enabled and, additionally, where the wiki is not using the [[mw:Extension:SocialProfile|SocialProfile]] extension. Should you decide to create <includeonly>[[mh:login:User:{{subst:BASEPAGENAME}}|your global user page]]</includeonly> on [[mh:login|'''Loginwiki''']] and wish for it to ''replace'' your {{<includeonly>safesubst:</includeonly>SITENAME}} user page, simply add the {{tl|delete}} template to the ''top'' of [[Special:MyPage|your {{<includeonly>safesubst:</includeonly>SITENAME}} user page]]</includeonly> by copying and pasting this code (<code><nowiki>{{Delete|1=Author requests deletion}}</nowiki></code>), and an [[Project:Administrators|administrator]] should delete it promptly (usually within 24 hours).
If you have any questions, after first reviewing Meta Wiki's [[meta:FAQ|FAQ]] and [[meta:Help center|help center]], you may be able to ask for local wiki assistance usually at [[Project:Community portal]], but please be sure to end ''all'' new topics or replies you make on talk pages, user talk pages (like this one), and [[:Category:Noticeboards|noticeboards]] with four tildes (<includeonly>{{subst:meta:Nowiki four tildes}}</includeonly>) to include both (a) a username and (b) a [[meta:Autoarchive|properly formatted timestamp]] for our talk page archiving [[User:Revibot|bot]].
{{{thanks|Thanks,}}}
{{<includeonly>safesubst:</includeonly>#ifeq:{{{sig}}}|no||~~<noinclude/>~~}}<noinclude>
{{documentation}}
[[Category:Templates]]
</noinclude>
36fdc06b29e14633f6a95455281e1a85350afc04
Module:Message box
828
114
221
2022-10-21T19:39:49Z
devwiki>Pppery
0
These can just go, the first for being very Wikipedia-specific, and the second for being almost impossible to import properly
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('Module:No globals')
local getArgs
local yesno = require('Module:Yesno')
local templatestyles = 'Module:Message box/styles.css'
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {user = 'tmbox', talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if args.demospace and args.demospace ~= '' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
else
-- default to ombox
obj.cfg = cfg.ombox
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.hasCategories = true
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
table.insert(self.classes, class)
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
end
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
end
self.info = args.info
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.invalidTypeError then
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
end
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Create the box table.
local boxTable = root:tag('table')
boxTable:attr('id', self.id or nil)
for i, class in ipairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
local function templatestyles(frame, src)
return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = templatestyles} }
.. 'CONFIG_MODULE'
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
be00cd389f9f2afcd361e5d5e33622839555cbd9
Template:Para/doc
10
112
217
2022-10-21T19:50:52Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
== Usage ==
This template is for giving examples of template parameter source code (useful in template documentation and talk page discussions of template code).
It must have at least one or two parameters itself. The first parameter is the name of the example parameter to display (this may be ''empty'', but it must be ''present''). The second (optional) parameter is a value for the first example parameter; or, if the first parameter is empty, the second illustrates an example [[mw:Help:Templates#Anonymous parameters|unnamed parameter]] (which in some cases may serve as a pre-defined parameter that takes no <code>{{!}}{{=}}value</code> after it, e.g. the {{para||section}} in {{tlx|Refimprove|section|SISTER=w:}}).
=== Examples ===
{| class="wikitable"
! Code
! Result
! Notes
|-
| {{tlx|para|name}}
| {{para|name}}
|
|-
| {{tlx|para|title|The Oxford English Dictionary}}
| {{para|title|The Oxford English Dictionary}}
|
|-
| {{tlx|para|2=<span style="font-size:1pt;"> </span>|3=section}}
| {{para||section}}
| For [[mw:Help:Templates#Parameters|unnamed parameters]]; note empty first parameter in the code
|-
| <code><nowiki>{{para|parameter|value}}</nowiki></code>
| {{para|parameter|value}}
|
|}
== Parameters ==
* {{para|1}} or first unnamed parameter – the parameter name. Give this parameter as explicitly blank and just fill in parameter 2 when you want to show an [[mw:Help:Templates#Anonymous parameters|unnamed parameter]] (which, depending on the context, may serve as a valueless parameter name); e.g., {{tlx||para||section}} → {{para||section}}
* {{para|2}} or second unnamed parameter – the value name. When the first parameter is given but is blank, the second represents an unnamed parameter's value (or a valueless parameter name), as illustrated above.
* {{para|plain|y}} (or any other value besides y) – removes the faint border and light-grey background, which may be useful in various situations. The border and text color are set to inherit, to use the colors of the surrounding text. This parameter cooperates with the two below, in that if either are used, the text will be colorized while the border and background will still be removed.
* {{para|style}} – to apply arbitrary CSS style, for some specialized contextual purpose. Example: {{para|style|background-color: Yellow;}}. Any color, background-color, or border specified here will override those provided by any of the above parameters, regardless of the order in which the parameters are given in the template. As this template uses a span element, only CSS that can apply to inline elements (not block elements) will work. Like the above parameters, it applies to the entire output.
** If you want to only style the parameter name and/or the value, just do so directly;<br />e.g.: <code><nowiki>{{para|page|'''single''' page number}}</nowiki></code>, <code><nowiki>{{para|page'''''<u>s</u>'''''|page '''range''', or '''multiple''' individual pages, or both}}</nowiki></code><br />gives: {{para|page|'''single''' page number}}, {{para|page'''''<u>s</u>'''''|page '''range''', or '''multiple''' individual pages, or both}}
==TemplateData==
<templatedata>
{
"params": {
"1": {
"label": "Parameter name",
"description": "The parameter name. Give this parameter as explicitly blank and just fill in parameter 2 when you want to show an unnamed parameter",
"type": "string",
"suggested": true
},
"2": {
"label": "Value name",
"description": "The value name. When the first parameter is given but is blank, the second represents an unnamed parameter's value (or a valueless parameter name).",
"type": "string",
"suggested": true
},
"plain": {
"description": "Removes the faint border and light-grey background",
"type": "boolean"
},
"style": {
"description": "Apply arbitrary CSS style, for some specialized contextual purpose.",
"example": "background-color: Yellow;",
"type": "content"
}
},
"description": "Gives examples of template parameter source code"
}
</templatedata>
<includeonly>
[[Category:Templates]]
</includeonly>
830caf3901b5ec26c55d028345f3d3116409a3b5
Template:Para
10
28
53
2022-10-21T19:52:33Z
devwiki>Pppery
0
wikitext
text/x-wiki
<code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">|{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}=}}{{{2|}}}</code><noinclude>
{{Documentation}}
<!--Categories and interwikis go near the bottom of the /doc subpage.-->
</noinclude>
7be5bee75307eae9342bbb9ff3a613e93e93d5a7
Module:Message box/configuration
828
115
223
2022-10-21T22:38:02Z
devwiki>Pppery
0
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ambox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ambox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ambox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
classes = {'metadata', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = 'Article message templates with missing parameters',
templateErrorParamsToCheck = {'issue', 'fix'},
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'cmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'cmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information icon4.svg'
},
system = {
class = 'fmbox-system',
image = 'Information icon4.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'imbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'imbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox license.png' -- @todo We need an SVG version of this
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ombox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ombox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'tmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'tmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
c6bd9191861b23e474e12b19c694335c4bc3af5f
Template:Current time
10
39
75
2022-11-01T19:57:46Z
devwiki>Pppery
0
Oops
wikitext
text/x-wiki
{{#switch:{{{1}}}
|Coordinated Universal Time=Current UTC is {{CURRENTTIME}}
|UTC-1=Current time for {{{1}}} is {{utc|23}}
|UTC-2=Current time for {{{1}}} is {{utc|22}}
|UTC-2:30=Current time for {{{1}}} is {{utc|21|30}}
|UTC-3=Current time for {{{1}}} is {{utc|21}}
|UTC-3:30=Current time for {{{1}}} is {{utc|20|30}}
|UTC-4=Current time for {{{1}}} is {{utc|20}}
|UTC-5=Current time for {{{1}}} is {{utc|19}}
|UTC-6=Current time for {{{1}}} is {{utc|18}}
|UTC-7=Current time for {{{1}}} is {{utc|17}}
|UTC-8=Current time for {{{1}}} is {{utc|16}}
|UTC-9=Current time for {{{1}}} is {{utc|15}}
|UTC-9:30=Current time for {{{1}}} is {{utc|14|30}}
|UTC-10=Current time for {{{1}}} is {{utc|14}}
|UTC-11=Current time for {{{1}}} is {{utc|13}}
|UTC-12=Current time for {{{1}}} is {{utc|12}}
|UTC+0:20=Current time for {{{1}}} is {{utc|0|20}}
|UTC+0:30=Current time for {{{1}}} is {{utc|0|30}}
|UTC+1=Current time for {{{1}}} is {{utc|1}}
|UTC+2=Current time for {{{1}}} is {{utc|2}}
|UTC+3=Current time for {{{1}}} is {{utc|3}}
|UTC+3:30=Current time for {{{1}}} is {{utc|3|30}}
|UTC+4=Current time for {{{1}}} is {{utc|4}}
|UTC+4:30=Current time for {{{1}}} is {{utc|4|30}}
|UTC+4:51=Current time for {{{1}}} is {{utc|4|51}}
|UTC+5=Current time for {{{1}}} is {{utc|5}}
|UTC+5:30=Current time for {{{1}}} is {{utc|5|30}}
|UTC+5:40=Current time for {{{1}}} is {{utc|5|40}}
|UTC+5:45=Current time for {{{1}}} is {{utc|5|45}}
|UTC+6=Current time for {{{1}}} is {{utc|6}}
|UTC+6:30=Current time for {{{1}}} is {{utc|6|30}}
|UTC+7=Current time for {{{1}}} is {{utc|7}}
|UTC+7:20=Current time for {{{1}}} is {{utc|7|20}}
|UTC+7:30=Current time for {{{1}}} is {{utc|7|30}}
|UTC+8=Current time for {{{1}}} is {{utc|8}}
|UTC+8:30=Current time for {{{1}}} is {{utc|8|30}}
|UTC+8:45=Current time for {{{1}}} is {{utc|8|45}}
|UTC+9=Current time for {{{1}}} is {{utc|9}}
|UTC+9:30=Current time for {{{1}}} is {{utc|9|30}}
|UTC+10=Current time for {{{1}}} is {{utc|10}}
|UTC+10:30=Current time for {{{1}}} is {{utc|10|30}}
|UTC+11=Current time for {{{1}}} is {{utc|11}}
|UTC+11:30=Current time for {{{1}}} is {{utc|11|30}}
|UTC+12=Current time for {{{1}}} is {{utc|12}}
|UTC+12:45=Current time for {{{1}}} is {{utc|12|45}}
|UTC+13=Current time for {{{1}}} is {{utc|13}}
|UTC+13:45=Current time for {{{1}}} is {{utc|13|45}}
|UTC+14=Current time for {{{1}}} is {{utc|14}}
|#default=Current time is {{CURRENTTIME}}
}}<noinclude>{{documentation|content=Returns the current time in a given timezone (defaulting to the timezone specified in [[Special:ManageWiki/settings#mw-section-localisation]], which in turn defaults to UTC)
== Examples ==
{{tlx|current time}} -> {{current time}}
{{tlx|current time|UTC+1}} -> {{current time|UTC+1}}
{{tlx|current time|UTC-5}} -> {{current time|UTC-5}}
[[Category:Templates]]
}}</noinclude>
84d7f12dbea154240f9fa86372863cd6152dd98b
Template:Description missing
10
51
99
2022-11-01T20:03:48Z
devwiki>Pppery
0
Use documentation
wikitext
text/x-wiki
<div class="boilerplate metadata" id="cleanup" style="text-align: center; background: #ffe; margin: .75em 15%; padding: .5em; border: 1px solid #e3e3b0;">
This media has no '''{{ #if: {{{1|}}} | {{{1}}} | description }}''', and may be lacking other information.
<br>
Media should have a summary to inform others of the content, author, source, and date if possible. If you know or have access to such information, please add it to the image page.
</div>
<includeonly>{{#switch:{{NAMESPACE}}|{{ns:6}}=|#default={{#ifeq:{{{category|}}}|no||[[Category:Images lacking a description|{{PAGENAME}}]]}}}}</includeonly><noinclude>
{{documentation}}
</noinclude>
2b5026cefd37c307f7f2ee331289c38741f834a5
Template:Discussion top/doc
10
68
133
2022-11-01T20:07:56Z
devwiki>Pppery
0
Add documentation
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
The {{Tlx|Discussion top}} and {{Tlx|Discussion bottom}} templates are used to close discussions on a talk page or a noticeboard.
== Usage ==
Place {{Tlx|Discussion top}} '''below''' the header containing the discussion, then place {{Tlx|Discussion bottom}} at the end of the discussion. A summary of the conclusions reached may be included as a parameter in the former.
Again: '''Place them below the header. Do not include the header, it will break archiving bots!'''
=== Example ===
<syntaxhighlight lang="moin">
== Header ==
{{Discussion top|reason=The result of this discussion was '''template created'''. ~~~~}}
I suggest that we make a template to note completed discussions. [[User:Example|Example]] ([[User talk:Example|talk]]) 13:05, 29 August 2015 (UTC)
* How about calling it ''discussion top'' and ''discussion bottom''? [[User:John|John]] ([[User talk:John|talk]]) 06:44, 3 September 2015 (UTC)
{{Discussion bottom}}
</syntaxhighlight>
Would produce:
{{Discussion top|reason=The result of this discussion was '''template created'''. [[User:Example|Example]] ([[User talk:Example|talk]]) {{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)}}
I suggest that we make a template to note completed discussions. [[User:Example|Example]] ([[User talk:Example|talk]]) 13:05, 29 August 2015 (UTC)
* How about calling it ''discussion top'' and ''discussion bottom''? [[User:John|John]] ([[User talk:John|talk]]) 06:44, 3 September 2015 (UTC)
{{Discussion bottom}}
<includeonly>
[[Category:Templates]]
</includeonly>
984eaa40720d1ced466a73a36055e282eb429103
Template:Discussion top
10
41
79
2022-11-01T20:08:13Z
devwiki>Pppery
0
Add documentation
wikitext
text/x-wiki
<div class="boilerplate metadata discussion-archived" style="background-color: #F2F4FC; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px solid #aaa">
:The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section.
::{{{1|}}}
----<noinclude></div>{{documentation}}</noinclude>
c8b38525e188dbfa68b0e9cdd1864ceff2ed100e
Template:Discussion bottom
10
40
77
2022-11-01T20:09:03Z
devwiki>Pppery
0
Add documentation
wikitext
text/x-wiki
<noinclude><div></noinclude>----
:The above discussion is preserved as an archive. Please do not modify it. Subsequent comments should be made in a new section </div><noinclude>{{documentation|Template:Discussion top/doc}}</noinclude>
80d5baa979985b3b685585611b0e954d2c1c6e10
Template:Welcome/doc
10
111
215
2022-11-01T20:29:27Z
devwiki>Pppery
0
This example is not needed here at all, as it already appears above
wikitext
text/x-wiki
{{documentation subpage}}
Simply add <code><nowiki>{{subst:Welcome}}</nowiki></code>, ''without'' an added section header and your signature (<code><nowiki>~~~~</nowiki></code>), to any user's talk page once they have made non-bot-like contributions to {{SITENAME}}.
=== Parameters ===
* {{para|header|no}} - If specified, don't automatically add a header to the message.
* {{para|hello|foo}} - Replace the first paragraph ("Hello, <username>, and welcome to {{SITENAME}}!")
* {{para|thanks|foo}} - Replace the "thanks" at the end.
* {{para|sig|no}} - If specified, don't automatically sign header to the message.
<includeonly>
[[Category:Templates]]
</includeonly>
37f6ea1e88d198122e45216d2a58a7363fd1f221
Template:Description missing/doc
10
113
219
2022-11-01T20:31:37Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
Place this template on any ''media file'' which lacks description, author information, date, or any other identification data. Any media bearing this template are automatically added to [[:Category:Images lacking a description]].
To add a file description, use [[Template:Information]].
=== Usage ===
;Syntax: '''{{ Description missing''' ['''|''' ''What's missing''] '''}}'''
;Notation
#Character written in bold must be typed as shown
#Words written in italic must be replaced with appropriate letters
#Parameters enclosed in “[” and “]” are optional
;Parameters
{| class = "wikitable"
! Parameter
! Description
|-
| ''What's missing''
| Optional parameter. Specify what kind of information is missing. If you omit this parameter, the template will assume that "description" is missing. Possible values include: "author information", "date", etc.
|}
; Examples
:<code><nowiki>{{Description missing}}</nowiki></code>
:<code><nowiki>{{Description missing|author information}}</nowiki></code>
:<code><nowiki>{{Description missing|date}}</nowiki></code>
Produces:
{{Description missing}}
{{Description missing|author information}}
{{Description missing|date}}
<includeonly>
[[Category:Templates]]
</includeonly>
fa3fd16eea9b10d2a1cdac2036ba5a905d1a1d2a
Template:Uses TemplateStyles
10
52
101
2022-11-07T02:43:20Z
devwiki>Pppery
0
3 revisions imported from [[:wikipedia:Template:Uses_TemplateStyles]]: Importing this now because the Wikipedia version will fail in a non-obvious way (a problem I caught on another Miraheze wiki)
wikitext
text/x-wiki
<includeonly>{{#invoke:Uses TemplateStyles|main}}</includeonly><noinclude>
{{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}}
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
7e26d8f257e302bd8a3dcbe53f52741ae0884f74
Template:Uses TemplateStyles/doc
10
117
227
2022-11-07T02:47:20Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go at the bottom of this page, and interwikis go on Wikidata. -->
This template is used to show that templates have been converted to use [[mw:Extension:TemplateStyles|TemplateStyles]]. It is placed at the top of the template's /doc page.
== Usage ==
; Basic : {{tlx|Uses TemplateStyles|''TemplateStyles page name''}}
; All parameters : {{tlx|Uses TemplateStyles|''TemplateStyles page 1''|''TemplateStyles page 2''|''TemplateStyles page 3''|...|category{{=}}''custom category''|nocat{{=}}''true''}}
The first TemplateStyles page name is required.
===TemplateStyles sandboxes===
Note that if a sandbox version of the TemplateStyle exists, it will also be linked. This is only for sandbox versions. The subpage name of the sandbox version should be the same, but as a subpage of the templates sandbox. For example, if the TemplateStyles page name is <code>Template:Foo/styles.css</code>, then the sandbox version should be <code>Template:Foo/sandbox/styles.css</code>
== Examples ==
===One style page===
{{tlx|Uses TemplateStyles|Template:Arrowlist/styles.css}}
{{Uses TemplateStyles|Template:Arrowlist/styles.css|nocat=true}}
{{clear}}
===Multiple style pages===
{{tlx|Uses TemplateStyles|Template:Arrowlist/styles.css|Template:Routemap/styles.css}}
{{Uses TemplateStyles|Template:Arrowlist/styles.css|Template:Routemap/styles.css|nocat=true}}
{{clear}}
===Sandbox version of style page exists===
{{tlx|Uses TemplateStyles|Template:Uses TemplateStyles/example.css}}
{{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}}
{{clear}}
===No style pages specified===
{{tlx|Uses TemplateStyles}}
{{Uses TemplateStyles|nocat=true}}
{{clear}}
== TemplateData ==
<templatedata>
{
"description": "Used to show that templates have been converted to use TemplateStyles.",
"format": "inline",
"params": {
"1": {
"label": "Stylesheet 1",
"description": "Name of the main stylesheet used in the template or module. Use multiple parameters to specify multiple stylesheets.",
"required": true,
"type": "wiki-page-name"
},
"2": {
"label": "Stylesheet 2",
"description": "Name of the second stylesheet.",
"type": "wiki-page-name"
},
"3": {
"label": "Stylesheet 3",
"description": "Name of the third stylesheet.",
"type": "wiki-page-name"
},
"4": {
"label": "Stylesheet 4",
"description": "Name of the fourth stylesheet.",
"type": "wiki-page-name"
},
"5": {
"label": "Stylesheet 5",
"description": "Name of the fifth stylesheet.",
"type": "wiki-page-name"
},
"6": {
"label": "Stylesheet 6",
"description": "Name of the sixth stylesheet.",
"type": "wiki-page-name"
},
"7": {
"label": "Stylesheet 7",
"description": "Name of the seventh stylesheet.",
"type": "wiki-page-name"
},
"8": {
"label": "Stylesheet 8",
"description": "Name of the eighth stylesheet.",
"type": "wiki-page-name"
},
"9": {
"label": "Stylesheet 9",
"description": "Name of the ninth stylesheet.",
"type": "wiki-page-name"
},
"10": {
"label": "Stylesheet 10",
"description": "Name of the tenth stylesheet.",
"type": "wiki-page-name"
}
}
}
</templatedata>
<includeonly>
[[Category:Templates]]
</includeonly>
c86681b5a4f99bb6940c1ab54645e0f43131bb4e
Module:Uses TemplateStyles
828
118
229
2022-11-07T02:51:31Z
devwiki>Pppery
0
Scribunto
text/plain
-- This module implements the {{Uses TemplateStyles}} template.
local mMessageBox = require('Module:Message box')
local p = {}
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args)
return p.renderBox(args)
end
function p.renderBox(tStyles)
local boxArgs = {}
if #tStyles < 1 then
boxArgs.text = '<strong class="error">Error: no TemplateStyles specified</strong>'
else
local tStylesLinks = {}
for i, ts in ipairs(tStyles) do
local sandboxLink = nil
local tsTitle = mw.title.new(ts)
if tsTitle then
local tsSandboxTitle = mw.title.new(string.format('%s:%s/sandbox/%s', tsTitle.nsText, tsTitle.baseText, tsTitle.subpageText))
if tsSandboxTitle and tsSandboxTitle.exists then
sandboxLink = string.format(' ([[:%s|sandbox]])', tsSandboxTitle.prefixedText)
end
end
tStylesLinks[i] = string.format('[[:%s]]%s', ts, sandboxLink or '')
end
local tStylesList = mw.text.listToText(tStylesLinks)
boxArgs.text = 'This ' ..
(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..
' uses [[mw:Extension:TemplateStyles|TemplateStyles]]:\n' .. tStylesList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Farm-Fresh css add.svg|32px|alt=CSS]]'
return mMessageBox.main('mbox', boxArgs)
end
return p
3c7364ddaba9beb17a73b0f5256cd7fc3b3051f4
Template:Header/doc
10
119
231
2022-12-16T04:40:31Z
devwiki>Pppery
0
8 revisions imported from [[:meta:Template:Header/doc]]
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
<pre>
{{header
| title =
| shortcut =
| notes =
| topbarhex =
| bodyhex =
| titlecolor =
| bodycolor =
}}
</pre>
===Relative links===
On pages with many subpages, using [[m:Help:Link#Subpage_feature|relative links]] is highly recommended. This shortens the code and ensures that pages remain linked together, even if the overall system is moved or reorganised. The three formats are <nowiki>[[/subpage]]</nowiki> (subpage), <nowiki>[[../]]</nowiki> (parent), and <nowiki>[[../sibling]]</nowiki> (sibling); see the example usage below. Note that <nowiki>[[../]]</nowiki> will expand to the title of the parent page, which is ideal if the page is renamed at a later time.
==See also==
{{#lst:Template:Template list|header-templates}}
5765ffdddc2682eb2227083ebcc24a126128ac5d
Template:Header
10
53
103
2022-12-16T04:46:16Z
devwiki>Pppery
0
wikitext
text/x-wiki
{| style="width: 100% !important;"
|-
| style="border-top: 4px solid #{{{topbarhex|6F6F6F}}}; background-color: #{{{bodyhex|F6F6F6}}}; padding: 10px 15px;" | {{#if:{{{shortcut|}}}| {{shortcut|{{{shortcut|uselang={{{uselang|{{CURRENTCONTENTLANGUAGE}}}}}}}}}}}}<div style="font-size:180%; text-align: left; color: {{{titlecolor|}}}">'''{{{title|{{{1|{{BASEPAGENAME}}}}}}}}'''</div>
<div style="padding-top:0.3em; padding-bottom:0.1em; font-size:100%; text-align: left; color: {{{bodycolor|}}}">{{{notes|Put some notes here!}}}</div>
|-
| style="height: 10px" |
|}
{{clear}}<noinclude>{{documentation}}[[Category:templates]]</noinclude>
03aac86137ab11bfccbcceb2de919475af2953dd
Template:Userbox/doc
10
109
211
2022-12-16T04:49:47Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
This template can be used to quickly create a [[w:Wikipedia:Userboxes|userbox]] for display on a user's [[Wikipedia:User pages|user page]] without having to know HTML or Wikitable syntax.
== Usage ==
<!-- Abstract usage of the template, one variable per row. -->
<pre style="overflow: auto">
{{userbox
| bodyclass = <!--Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.-->
| border-c = <!--border color (default=id-c or #999999)-->
| border-s = <!--border width in pixels (default=1)-->
| float = <!--left|right|none (default=left)-->
| id = <!--id image or text (image size should normally not exceed 90x45px)-->
| id-a = <!--id horizontal alignment left/center/right/justify (default=center)-->
| id-c = <!--id background color (default=#DDDDDD)-->
| id-fc = <!--id font color (default=info-fc or black)-->
| id-h = <!--id box height in pixels (default=45)-->
| id-lh = <!--id line height (default=1.25em)-->
| id-op = <!--id other CSS parameters-->
| id-p = <!--id cell padding (default=0 1px 0 0)-->
| id-s = <!--id text size in points (default=14)-->
| id-w = <!--id box width in pixels (default=45)-->
| info-class = <!--Adds an HTML class attribute to the "info" HTML table-row, to allow for styling, emission of microformats, etc.-->
| info = <!--info text or image-->
| info-a = <!--info horizontal alignment left/center/right/justify (default=left)-->
| info-c = <!--info background color (default=#EEEEEE)-->
| info-fc = <!--info font color (default=black)-->
| info-lh = <!--info line height (default=1.25em)-->
| info-op = <!--info other CSS parameters-->
| info-p = <!--info padding (default=0 4px 0 4px)-->
| info-s = <!--info text size in points (default=8)-->
| nocat = <!--block page category declarations; see [[WP:NOCAT]] (default=false)-->
| usercategory = <!--user category (optional, unlinked and without the "Category:" part)-->
| usercategory2 = <!--user category (optional)-->
| usercategory3 = <!--user category (optional)-->
| usercategory4 = <!--user category (optional)-->
| usercategory5 = <!--user category (optional)-->
}}
</pre>
* All parameters are optional.
* Images should normally be scaled to x45px or less.
<!-- Explain what this template's parameters do -- if no params, delete the definition. -->
Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here:
<pre>
{{userbox
| border-c =
| id =
| id-c =
| id-fc =
| id-s =
| info =
| info-c =
| info-fc =
| info-lh =
| info-s =
}}</pre>
== Examples ==
{|
! style="width: 300px;" | Code
! Result
|-
| <pre>{{userbox
| border-c = #aaffaa
| border-s = 2
| id = foo
| id-c = #ffffee
| id-s = 20
| info = ''foo bar''
| info-c = #ffeeff
| info-s = 12
}}</pre> || {{userbox|id=foo|id-s=20|id-c=#ffffee|info=''foo bar''|info-c=#ffeeff|info-s=12|border-c=#aaffaa|border-s=2}}
|-
| colspan="2"| Below example shows the default appearance of a userbox, which is (much) higher than the 45px.<br>Compare the height of the one below with the above userbox.
|-
| <pre>{{userbox
| border-c = #aaffaa
| border-s = 2
| id = foo logo
| id-c = #ffffee
| info = ''We are trying to see
default distance in between text
lines, see the distance in
between cell content and its border,
and also see total height.''
| info-c = #ffeeff
}}</pre> || {{userbox|id=foo logo|id-c=#ffffee|info=''We are trying to see default distance in between text lines, see the distance in between cell content and its border, and also see total height.''|info-c=#ffeeff|border-c=#aaffaa|border-s=2}}
|-
| colspan="2"| Below example shows how we can change that userbox and further specify parameters to bring down<br>the overall height of the userbox to the recommended height of 45px, even with four text lines.<br>Cell padding parameter "''info-p''" can also be set at "''1pt 1pt 1pt 2pt''", or "''1pt 2pt''" for better appearance,<br>when there are 4 text lines.
|-
| <pre>{{userbox
| border-c = #aaffaa
| border-s = 1
| id = foo logo
| id-c = #ffffee
| id-lh = 1.1em
| id-s = 14
| info = ''We have specified values
to lessen the distance between
text lines and padding space between
cell content and its border.''
| info-c = #ffeeff
| info-lh = 1.05em
| info-p = 1pt
| info-s = 8
}}</pre> || {{userbox|id=foo logo|id-s=14|id-lh=1.1em|id-c=#ffffee|info=''We have specified values to lessen the distance between text lines and padding space between cell content and its border.''|info-c=#ffeeff|info-s=8|info-p=1pt|info-lh=1.05em|border-c=#aaffaa|border-s=1}}
|-
| colspan="2"| Below example is for advanced users, showing how we can specify other [[w:Cascading Style Sheets|CSS]] properties,for example, "''font-family''",<br>to change the font or "''text-decoration''" to add lines around the text. Below, on the right side are two userboxes:<br>the top one is displayed without either parameters; and the bottom userbox is displayed by using the below code,<br>with the help of the "''info-op''" field.
|-
| <pre>{{userbox
| border-c = #afa
| border-s = 2
| id = foo logo
| id-c = #ffe
| id-lh = 1.1em
| id-s = 14
| info = foo bar
| info-c = #fef
| info-op = font-family: 'Courier New', monospace; text-decoration: wavy overline green;
| info-s = 14
}}</pre> || colspan="2"| {{Userbox|id=foo logo|id-s=14|id-lh=1.1em|id-c=#ffe|info=foo bar|info-c=#fef|info-s=14|border-c=#afa|border-s=2}} <br style="clear:both"> <br /> {{Userbox|id=foo logo|id-s=14|id-lh=1.1em|id-c=#ffe|info=foo bar|info-c=#fef|info-s=14|info-op=font-family: 'Courier New', monospace; text-decoration: wavy overline green;|border-c=#afa|border-s=2}}
|}
==Microformats==
; bodyclass : This parameter is inserted into the "class" attribute for the userbox as a whole.
; info-class : This parameter is inserted into the "class" attribute for the info component.
This template supports the addition of [[w:microformat|microformat]] information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a userbox as containing [[w:hCard|hCard]] information about a person, for example, add the following parameter:
<pre>
| bodyclass = vcard
</pre>
''or''
<pre>
| info-class = vcard
</pre>
''then'' (for example):
<pre><nowiki>
| title = …the books of <span class="fn">[[Iain Banks]]</span>
</nowiki></pre>
...and so forth.
See [[w:Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia.
== Template Data ==
<TemplateData>{
"description": "This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.",
"params": {
"bodyclass": {
"label": "bodyclass",
"description": "Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.",
"type": "string",
"required": false
},
"border-c": {
"label": "border-c",
"description": "border color",
"type": "string",
"default": "#999",
"required": false
},
"border-s": {
"label": "border-s",
"description": "border width in pixels",
"type": "string",
"default": "1",
"required": false
},
"float": {
"label": "float",
"description": "left|right|none",
"type": "string",
"default": "left",
"required": false
},
"id": {
"label": "id",
"description": "id image or text",
"type": "string",
"required": false
},
"id-a": {
"label": "id-a",
"description": "id horizontal alignment left/center/right/justify",
"type": "string",
"default": "center",
"required": false
},
"id-c": {
"label": "id-c",
"description": "id background color",
"type": "string",
"default": "#d0d0d0",
"required": false
},
"id-fc": {
"label": "id-fc",
"description": "id font color",
"type": "string",
"default": "black",
"required": false
},
"id-h": {
"label": "id-h",
"description": "id box height in pixels",
"type": "string",
"default": "45",
"required": false
},
"id-lh": {
"label": "id-lh",
"description": "id line height",
"type": "string",
"default": "1.25em",
"required": false
},
"id-op": {
"label": "id-op",
"description": "id other CSS parameters",
"type": "string",
"required": false
},
"id-p": {
"label": "id-p",
"description": "id cell padding",
"type": "string",
"default": "0 1px 0 0",
"required": false
},
"id-s": {
"label": "id-s",
"description": "id text size in points",
"type": "string",
"default": "14",
"required": false
},
"id-w": {
"label": "id-w",
"description": "id box width in pixels",
"type": "string",
"default": "45",
"required": false
},
"info-class": {
"label": "info-class",
"description": "Adds an HTML class attribute to the \"info\" HTML table-row, to allow for styling, emission of microformats, etc.",
"type": "string",
"required": false
},
"info": {
"label": "info",
"description": "info text or image",
"type": "string",
"required": false
},
"info-a": {
"label": "info-a",
"description": "info horizontal alignment left/center/right/justify",
"type": "string",
"default": "left",
"required": false
},
"info-c": {
"label": "info-c",
"description": "info background color",
"type": "string",
"default": "#e0e0e0",
"required": false
},
"info-fc": {
"label": "info-fc",
"description": "info font color",
"type": "string",
"default": "black",
"required": false
},
"info-lh": {
"label": "info-lh",
"description": "info line height",
"type": "string",
"default": "1.25em",
"required": false
},
"info-op": {
"label": "info-op",
"description": "info other CSS parameters",
"type": "string",
"required": false
},
"info-p": {
"label": "info-p",
"description": "info padding",
"type": "string",
"default": "0 4px 0 4px",
"required": false
},
"info-s": {
"label": "info-s",
"description": "info text size in points",
"type": "string",
"default": "8",
"required": false
},
"nocat": {
"label": "nocat",
"description": "block page category declarations (see WP:NOCAT)",
"type": "string",
"default": "false",
"required": false
},
"usercategory": {
"label": "usercategory",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory2": {
"label": "usercategory2",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory3": {
"label": "usercategory3",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory4": {
"label": "usercategory4",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory5": {
"label": "usercategory5",
"description": "user category (optional)",
"type": "string",
"required": false
}
},
"format": "block"
}</TemplateData>
<includeonly>[[Category:Templates]]</includeonly>
dd41ebb3f967b6cdfb1f5802c2bdd71bc115e74a
Template:=/doc
10
66
129
2022-12-16T04:50:29Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
== Usage ==
This template allows "=" to be used in unnamed template parameters. It inserts the [[w:equals-sign|equals-sign]] ("=") into the text. Alternatively, the [[w:HTML|HTML]] entity "&#61;" can be used if there is no need for it to be interpreted as wikimarkup, such as when the literal equals-sign is to be displayed to the user.
== Examples ==
* <code><nowiki>{{tlx|tlx|SISTER{{=}}M}}</nowiki></code> produces: {{tlx|tlx|SISTER{{=}}M}}
You can also use named parameters to bypass the restriction:
* <code><nowiki>{{tlx|tlx|2=SISTER=M}}</nowiki></code> produces: {{tlx|tlx|2=SISTER=M}}
== TemplateData ==
<templatedata>
{
"description": "A template to allow = to be used in template parameters",
"params": {},
"format": "{{_\n| _ = _\n}}"
}
</templatedata>
== See also ==
* [[mw:Help:Magic words]]
<includeonly>[[Category:Templates]]</includeonly>
6ddba85e618f6e260254e185a6f150c2785439b6
Template:Documentation/doc
10
63
123
2022-12-16T04:57:03Z
devwiki>Pppery
0
/* Usage */
wikitext
text/x-wiki
{{documentation subpage}}
This is the {{tl|Documentation}} template, used on almost every template page to contain that template's documented instructions and information.
For detailed instructions on how and when to use this template, see [[w:Wikipedia:Template documentation]].
This template displays a green documentation box like you are seeing now and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to.
This template is intended for documenting templates and other pages that are [[w:Wikipedia:Transclusion|transcluded]] onto other pages. It can be used in the [[w:Wikipedia:Template namespace|template namespace]] and most other [[w:Wikipedia:Namespace|namespace]]s.
Use of this template allows templates to be [[w:Wikipedia:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation and categories.
===Usage===
Normally this template is used without any parameters, placed at the bottom of the template or page being documented, within a <noinclude> container:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
</noinclude>
</syntaxhighlight>
Then this template automatically loads the content from the /doc subpage of the template it is used on.
This template can also load the content from any other page. Like this:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation |Template:Other page/doc}}
</noinclude>
</syntaxhighlight>
Note that when loading the documentation from a page other than the local /doc page it becomes tricky to handle the categories.
The content can also be fed directly as text. Like this:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation
| content =
(some documentation)
}}</noinclude>
</syntaxhighlight>
When the <nowiki>|content=</nowiki> parameter is used, the doc box normally does not show the [edit] [purge] links in the top right corner. Note that if the /doc page exists, a link to it is still shown in the link box below the doc box.
Parameter <nowiki>|1=</nowiki> and the <nowiki>|content=</nowiki> parameter can also be combined, like this:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation |1=Template:Any page/doc
| content =
{{Template:Any page/doc |parameters}}
}}</noinclude>
</syntaxhighlight>
Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But the '''content''' parameter is used for the content shown in the doc box. The above code means that the content is transcluded as {{tlx|Any page/doc|parameters}}. In this example a parameter is also fed to the /doc page being loaded.
=== Shortcut ===
To automatically insert the [[w:Wikipedia:Noinclude|noinclude tags]], the template call and the guiding comment, use this [[w:WP:Substitution|substitution]] code:<br>
:<code><nowiki>{{subst:doc-code}}</nowiki></code>
===Best practice===
The code should be added at the bottom of the template code, with no space before <noinclude> (which would cause extra space on pages where the template is used).
Categories that apply to the template itself should be added to the bottom of the /doc subpage, inside <includeonly> tags.
If the documentation page contains <includeonly> or <noinclude> tags as part of the visible documentation text, replace the "<code><</code>" with "<code>&lt;</code>".
===Heading===
When in the Template namespace, this template shows this heading:
:[[File:Test Template Info-Icon - Version (2).svg|32px|link=[[w:Wikipedia:Template documentation]]]] '''Template documentation'''
In most other namespaces, such as "{{SITENAME}}:", it shows this heading:
:'''Documentation'''
But when on File (image) pages it shows this heading:
:'''Summary'''
The '''heading''' parameter can be used to set the heading to something else. Like this:
:<code><nowiki>{{Documentation |heading=Infobox documentation}}</nowiki></code>
If the '''heading''' parameter is empty but defined, no heading is shown and no [edit] [purge] links are shown. Like this:
:<code><nowiki>{{Documentation |heading=}}</nowiki></code>
The '''heading-style''' parameter can be fed optional [[w:Cascading Style Sheets|CSS]] values. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:
:<code>heading-style=font-size:150%;color:red;</code>
===Link box===
Below the big doc box is a small link box that shows some meta-data about the documentation. The link box shows different things depending on what parameters are fed to this template, and in which namespace it is used. In some cases the link box is not shown at all.
To hide the link box, add the parameter
: <nowiki>|link box=off</nowiki>.
You can also insert customised text into the link box, by setting the <nowiki>|link box=</nowiki> parameter. For example:
<pre style="width:auto; overflow:scroll">
|link box=This documentation is automatically generated by [[w:Template:Country showdata]]
</pre>
===Automatic functions===
If the documentation page does not exist, the [create] link includes a [[mw:Manual:Creating pages with preloaded text|preload]] page so that clicking it will pre-fill the edit form with the basic documentation page format. Preload text is also used for the /sandbox and /testcases [create] links.
===Subject namespaces vs. talk namespaces===
Terminology: ''Subject namespaces'' are the opposite of ''talk namespaces''. For instance "Template:" is the subject space of "Template talk:".
This template is usually placed in a subject namespace, within <noinclude> tags. But in some cases this template needs to be on the talk page:
* In the Mediawiki namespace, since <noinclude> often does not work in system messages, and since the Mediawiki namespace needs to be kept clean for performance reasons.
When placed on talk pages, this template usually is placed near the top of the page and without <noinclude> tags.
The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki [[w:m:Help:Link#Subpage feature|subpage feature]] enabled: Main, File, Mediawiki and Category. (But currently we only show the /sandbox and /testcases links from User, User talk, Template and Template talk namespaces.) There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those) namespaces.
This template automatically points its [create] links for the /doc, /sandbox and /testcases to the right namespace.
===Technical details===
The preload page for the /doc [create] link is [[Template:Documentation/preload]]. The preload pages for the /sandbox and /testcases [create] links are [[Template:Documentation/preload-sandbox]] and [[Template:Documentation/preload-testcases]]. The preload page for the /sandbox [mirror] link is [[Template:Documentation/mirror]].
====Full syntax====
<pre>
{{Documentation}}
{{Documentation
| content =
}}
{{Documentation
| [path to documentation page]
| heading-style =
| heading =
| link box =
}}
</pre>
===See also===
* {{tl|Documentation subpage}}, a notice placed at the top of a /doc subpage explaining its role and including a link to the page it documents.
* [[w:Wikipedia:Template documentation]] is a how-to guide to template documentation.
* [[w:Wikipedia:Template sandbox and test cases]] explains the use of /sandbox and /testcases subpages and includes more information about template testing.
92ff94e315af492eb2698f80537068806f486349
Category:Documentation preloads
14
54
105
2022-12-16T17:09:12Z
devwiki>Pppery
0
Created page with "[[Category:Templates]]"
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Template:See also
10
55
107
2023-01-10T01:56:06Z
devwiki>Pppery
0
Revert to version by Wikipedia->bkonrad
wikitext
text/x-wiki
{{hatnote|extraclasses=boilerplate seealso|{{{altphrase|See also}}}: {{#if:{{{1<includeonly>|</includeonly>}}} |<!--then:-->[[:{{{1}}}{{#if:{{{label 1|{{{l1|}}}}}}|{{!}}{{{label 1|{{{l1}}}}}}}}]] |<!--else:-->'''Error: [[Template:See also|Template must be given at least one article name]]'''
}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|, | and }} [[:{{{2}}}{{#if:{{{label 2|{{{l2|}}}}}}|{{!}}{{{label 2|{{{l2}}}}}}}}]]
}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|, |, and }} [[:{{{3}}}{{#if:{{{label 3|{{{l3|}}}}}}|{{!}}{{{label 3|{{{l3}}}}}}}}]]
}}{{#if:{{{4|}}}|{{#if:{{{5|}}}|, |, and }} [[:{{{4}}}{{#if:{{{label 4|{{{l4|}}}}}}|{{!}}{{{label 4|{{{l4}}}}}}}}]]
}}{{#if:{{{5|}}}|{{#if:{{{6|}}}|, |, and }} [[:{{{5}}}{{#if:{{{label 5|{{{l5|}}}}}}|{{!}}{{{label 5|{{{l5}}}}}}}}]]
}}{{#if:{{{6|}}}|{{#if:{{{7|}}}|, |, and }} [[:{{{6}}}{{#if:{{{label 6|{{{l6|}}}}}}|{{!}}{{{label 6|{{{l6}}}}}}}}]]
}}{{#if:{{{7|}}}|{{#if:{{{8|}}}|, |, and }} [[:{{{7}}}{{#if:{{{label 7|{{{l7|}}}}}}|{{!}}{{{label 7|{{{l7}}}}}}}}]]
}}{{#if:{{{8|}}}|{{#if:{{{9|}}}|, |, and }} [[:{{{8}}}{{#if:{{{label 8|{{{l8|}}}}}}|{{!}}{{{label 8|{{{l8}}}}}}}}]]
}}{{#if:{{{9|}}}|{{#if:{{{10|}}}|, |, and }} [[:{{{9}}}{{#if:{{{label 9|{{{l9|}}}}}}|{{!}}{{{label 9|{{{l9}}}}}}}}]]
}}{{#if:{{{10|}}}|{{#if:{{{11|}}}|, |, and }} [[:{{{10}}}{{#if:{{{label 10|{{{l10|}}}}}}|{{!}}{{{label 10|{{{l10}}}}}}}}]]
}}{{#if:{{{11|}}}|{{#if:{{{12|}}}|, |, and }} [[:{{{11}}}{{#if:{{{label 11|{{{l11|}}}}}}|{{!}}{{{label 11|{{{l11}}}}}}}}]]
}}{{#if:{{{12|}}}|{{#if:{{{13|}}}|, |, and }} [[:{{{12}}}{{#if:{{{label 12|{{{l12|}}}}}}|{{!}}{{{label 12|{{{l12}}}}}}}}]]
}}{{#if:{{{13|}}}|{{#if:{{{14|}}}|, |, and }} [[:{{{13}}}{{#if:{{{label 13|{{{l13|}}}}}}|{{!}}{{{label 13|{{{l13}}}}}}}}]]
}}{{#if:{{{14|}}}|{{#if:{{{15|}}}|, |, and }} [[:{{{14}}}{{#if:{{{label 14|{{{l14|}}}}}}|{{!}}{{{label 14|{{{l14}}}}}}}}]]
}}{{#if:{{{15|}}}|, and [[:{{{15}}}{{#if:{{{label 15|{{{l15|}}} }}}|{{!}}{{{label 15|{{{l15|}}} }}} }}]]
}}{{#if:{{{16|}}}| — '''<br/>Error: [[Template:See also|Too many links specified (maximum is 15)]]'''
}}}}<noinclude>
{{documentation}}
</noinclude>
0315f43d7e4b679054955c7a50fe554ab1df63de
Template:See also/doc
10
120
233
2023-01-10T01:58:04Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{documentation subpage}}
This template is used to create [[w:WP:Hatnotes|hatnotes]] to point to a small number of other related titles. It looks like this:
{{See also|Article}}
Refer to the examples below to see how the template handles link targets containing section links and commas.
==Usage==
; Basic usage:
{{See also|''page1''|''page2''|''page3''|...}}
; All parameters:
{{See also|''page1''|''page2''|''page3''| ...
|label 1 = ''label 1''|label 2 = ''label2''|label 3 = ''label3''| ...
|l1 = ''label1''|l2 = ''label2''|l3 = ''label3''| ...
|selfref = ''yes''|category = ''no''}}
==Parameters==
This template accepts the following parameters:
* <code>1</code>, <code>2</code>, <code>3</code>, ... – the pages to link to. At least one page name is required. Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
* <code>label 1</code>, <code>label 2</code>, <code>label 3</code>, ...; or <code>l1</code>, <code>l2</code>, <code>l3</code>, ...; optional labels for each of the pages to link to.
* <code>selfref</code> – if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references to Wikipedia. See [[Template:Selfref]] for more information.
* <code>category</code> – if set to "no", "n", "false", or "0", suppresses the error tracking category ([[:Category:Hatnote templates with errors]]). This only has an effect if the first positional parameter (the page to link to) is omitted.
== Examples ==
* <code><nowiki>{{See also|Article}}</nowiki></code> → {{See also|Article}}
* <code><nowiki>{{See also|Article#Section}}</nowiki></code> → {{See also|Article#Section}}
* <code><nowiki>{{See also|Article#Section|label 1=Custom section label}}</nowiki></code> → {{See also|Article#Section|label 1=Custom section label}}
* <code><nowiki>{{See also|Article1|Article2|Article3}}</nowiki></code> → {{See also|Article1|Article2|Article3}}
* <code><nowiki>{{See also|Article1|Article,2|Article3}}</nowiki></code> → {{See also|Article1|Article,2|Article3}}
* <code><nowiki>{{See also|Article1|l1=Custom label 1|Article2|l2=Custom label 2}}</nowiki></code> → {{See also|Article1|l1=Custom label 1|Article2|l2=Custom label 2}}
* <code><nowiki>{{See also|Veni, vidi, vici|Julius Caesar}}</nowiki></code> → {{See also|Veni, vidi, vici|Julius Caesar}}
* <code><nowiki>{{See also|Veni, vidi, vici|Julius Caesar#Civil war}}</nowiki></code> → {{See also|Veni, vidi, vici|Julius Caesar#Civil war}}
* <code><nowiki>{{See also|Julius Caesar#Civil war|Veni, vidi, vici}}</nowiki></code> → {{See also|Julius Caesar#Civil war|Veni, vidi, vici}}
* <code><nowiki>{{See also|Julius Caesar#Civil war|Crossing the Rubicon}}</nowiki></code> → {{See also|Julius Caesar#Civil war|Crossing the Rubicon}}
==Errors==
If no page names are supplied, the template outputs the following message with the (help) wikilink pointing to the "Errors" section of this page:
*{{See also|category=no}}
If you see this error message, it is for one of three reasons:
# No parameters were specified (the template code was <code><nowiki>{{See also}}</nowiki></code> with no pipe character nor page to link to). Please use <code><nowiki>{{See also|</nowiki>''page''<nowiki>}}</nowiki></code> instead.
# Some parameters were specified, but no page names were included. For example, the template text <code><nowiki>{{See also|selfref=yes}}</nowiki></code> will produce this error. Please use (for example) <code><nowiki>{{See also|</nowiki>''page''<nowiki>|selfref=yes}}</nowiki></code> instead.
# A page name was specified, but it contains an equals sign ("="). The equals sign has a special meaning in template code, and because of this it cannot be used in template parameters that do not specify a parameter name. For example, the template code <code><nowiki>{{See also|1+1=2|2+2=4}}</nowiki></code> will produce this error. To work around this, you can specify the parameter name explicitly by using <code>1=</code>, <code>2</code>, etc., before the page name, like this: <code><nowiki>{{See also|1=1+1=2|2=2+2=4}}</nowiki></code>.
If you see this error message and are unsure of what to do, please post a message on [[WP:HD|the help desk (WP:HD)]], and someone should be able to help you.
To see a list of wikilinks to articles that contain this error message, see the [[Wikipedia:Maintenance|maintenance category]]: [[:Category:Hatnote templates with errors]].
==TemplateData==
<templatedata>
{
"description": "This template creates a hatnote to point to a small number of related pages. It is placed at the top of a section, directly underneath the section heading.",
"params": {
"1": {
"label": "Page 1",
"description": "The name of the first page that you want to link to.",
"type": "wiki-page-name",
"required": true,
"example": "Article name"
},
"2": {
"label": "Page 2",
"description": "The name of the second page that you want to link to.",
"type": "wiki-page-name",
"required": false
},
"3": {
"label": "Page 3",
"description": "The name of the third page that you want to link to. More pages can be added using the parameters \"4\", \"5\", \"6\", etc.",
"type": "wiki-page-name",
"required": false
},
"label 1": {
"label": "Label 1",
"type": "string",
"description": "What the first linked article is to be displayed as. ",
"aliases": [
"l1"
]
},
"label 2": {
"label": "Label 2",
"type": "string",
"description": "What the second linked article is to be displayed as.",
"aliases": [
"l2"
]
},
"label 3": {
"aliases": [
"l3"
],
"type": "string",
"label": "Label 3",
"description": "What the third linked article is to be displayed as. Other labels can be added by using increasing numbers (starting with \"label 4\" or \"l4\" for page 4) as parameter names."
},
"selfref": {
"type": "boolean",
"label": "Self reference",
"description": "Set to \"yes\" if the template is a self-reference to Wikipedia that would not make sense on mirrors or forks of the Wikipedia site.",
"example": "yes",
"default": "no"
},
"category": {
"label": "Category",
"description": "Set to \"no\", \"n\", \"false\", or \"0\" to suppresses the error tracking category (Category:Hatnote templates with errors). This only has an effect if no page names are specified.",
"type": "boolean",
"default": "yes",
"example": "no"
}
},
"format": "inline"
}
</templatedata>
==See also==
<includeonly>
[[Category:Templates]]
</includeonly>
02774f4e6b8e9592547778c4ff1d268700853631
Template:HoYoverse Wikis
10
56
109
2023-01-13T23:48:21Z
devwiki>Pppery
0
Not sure this is within scope, but for now
wikitext
text/x-wiki
{| style="border-radius:5px; width: 100%; border-radius: 15px; -moz-border-radius-topright:15px; -moz-border-radius-topleft:15px; -moz-border-radius-bottomright:15px; -moz-border-radius-bottomleft:15px;border: 3px solid black;" align="center"
|
{| cellspacing="3" width="100%"
| width="50%" valign="top" style="text-align: left;" |
<div style="font-size:115%; padding:5px">'''Miraheze Wikis about HoYoverse'''
* [https://hoyodex.miraheze.org/wiki/Main_Page HoYodex]
* [https://genshinimpact.miraheze.org/wiki/Genshin_Impact_Wiki Genshin Impact Wiki]
</div>
|}
|}<noinclude>[[Category:Templates]]</noinclude>
2ca26d3679675bb149a948e098fb692db7e5778b
Template:Pending
10
88
173
2023-01-16T07:23:51Z
devwiki>BrandonWM
0
from meta
wikitext
text/x-wiki
{{On hold|{{{1|Pending}}}}}<noinclude>{{Documentation}}</noinclude>
3d534f8f2cf14f73be843d306efcecbff05c7f5e
Template:Partly done
10
87
171
2023-01-16T07:26:51Z
devwiki>BrandonWM
0
from meta
wikitext
text/x-wiki
<span class="nowrap">[[File:Yellow_check.svg|18px|link=|alt=]] '''{{{1|Partly done}}}'''</span>{{{{{|safesubst:}}}#if:{{{2|{{{note|{{{reason|}}}}}}}}}|: {{{2|{{{note|{{{reason}}}}}}}}}}}<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
24a90b5a5c4c716b7ec12889fbd09a1da2ba1ca3
Template:Resolved
10
91
177
2023-01-16T07:28:00Z
devwiki>BrandonWM
0
from meta
wikitext
text/x-wiki
<span class="nowrap">[[File:Yes check.svg|18px|link=]] '''{{{1|Resolved}}}'''</span>{{{{{|safesubst:}}}#if:{{{2|{{{note|{{{reason|}}}}}}}}}|: {{{2|{{{note|{{{reason}}}}}}}}}}}<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
bcebb832c81fc395e8891f82747510f76292cb34
Template:Agree
10
79
155
2023-01-16T07:29:51Z
devwiki>BrandonWM
0
from meta
wikitext
text/x-wiki
[[File:Symbol confirmed.svg|18px|link=]] '''{{{1|Agree}}}'''<noinclude>{{documentation}}</noinclude>
775ddedaccda0d477a1b3c82d422e3760c862609
Template:Working
10
95
185
2023-01-16T07:30:45Z
devwiki>BrandonWM
0
from meta
wikitext
text/x-wiki
[[File:Icon tools.svg|20px|link=]] '''{{{1|Working}}}'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
0619210f08d5114b9a348b4f1045a0b6f4552012
Template:Idea
10
84
165
2023-01-16T07:31:31Z
devwiki>BrandonWM
0
from meta
wikitext
text/x-wiki
[[File:Dialog-information on.svg|18px|link=]] '''{{{1|Idea}}}:'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
e4062daed60634ce9e9cd2f052d9102bcf7e2916
Template:Reviewing
10
92
179
2023-01-16T07:34:11Z
devwiki>BrandonWM
0
add from meta
wikitext
text/x-wiki
[[File:Pictogram voting wait green.svg|17px|link=]] '''{{{1|Reviewing}}}...'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
0184f75a66f991d9eb99f23a75df36dd184e0c4b
Template:Note
10
85
167
2023-01-16T07:34:58Z
devwiki>BrandonWM
0
Created page with "[[File:Pictogram voting info.svg|18px|link=]] '''{{{1|Note:}}}'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>"
wikitext
text/x-wiki
[[File:Pictogram voting info.svg|18px|link=]] '''{{{1|Note:}}}'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
4d5cae62908f9cc8da2988712b236fe939bc80e2
Template:Question
10
89
175
2023-01-16T07:35:38Z
devwiki>BrandonWM
0
meta
wikitext
text/x-wiki
[[File:Pictogram voting question.svg|18px|link=]] '''{{{1|Question:}}}'''<noinclude>{{documentation}} [[Category:Resolution templates]]</noinclude>
9fae3d5ccc70d95a5a7de8983d7a82c1a55853e3
Template:High priority
10
83
163
2023-01-16T07:36:41Z
devwiki>BrandonWM
0
meta
wikitext
text/x-wiki
[[File:Exclamationdiamond.svg|20px|link=]] '''{{{1|High Priority}}}'''{{{{{|safesubst:}}}#if:{{{note|{{{reason|}}}}}}|<nowiki />: {{{note|{{{reason}}}}}}}}<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
65d49ca7f928fef46651d89d894267497560a60b
Template:Thank you
10
93
181
2023-01-16T07:37:23Z
devwiki>BrandonWM
0
meta
wikitext
text/x-wiki
<span class="nowrap">[[File:Face-smile.svg|18px|link=]] '''{{{1|Thank you}}}'''</span><noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
4312420b6485d1eb316af5c56f663a7d618afb9b
Template:Done
10
76
149
2023-01-16T22:22:56Z
devwiki>Pppery
0
Reverted edits by [[Special:Contributions/BrandonWM|BrandonWM]] ([[User talk:BrandonWM|talk]]) to last revision by MacFan4000
wikitext
text/x-wiki
<span class="nowrap">[[File:Yes check.svg|18px|link=|alt=]] '''{{{1|Done}}}'''</span>{{{{{|safesubst:}}}#if:{{{2|{{{note|{{{reason|}}}}}}}}}|: {{{2|{{{note|{{{reason}}}}}}}}}}}<noinclude>
{{documentation}}
[[Category:Resolution templates]]</noinclude>
717c1385d516cd84dc05a10ba88359a52c9d8415
Template:Pseudoheading
10
57
111
2023-01-16T22:35:51Z
devwiki>Pppery
0
Not necessarily true on Miraheze
wikitext
text/x-wiki
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; {{#switch: {{{level|{{{sub|}}}}}}
| 1 = font-size: 1.8em; font-family: 'Linux Libertine',Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;
| 2 | #default = font-size: 1.5em; font-family: 'Linux Libertine',Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;
| 3 = font-size: 1.17em; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
| 4 = font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
| 5 = font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
| 6 = font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
}}">{{{1|Section}}}</div><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
817a0347abab19312f02c90927c0f8b0e1e224a3
Template:Pseudoheading/doc
10
121
235
2023-01-16T22:41:13Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
This template is used to create examples of section heading wiki markup in help and similar pages. Fake headings do not appear in the table of contents. They are styled to appear the same as the default heading styles in the Vector skin, and will not be influenced by custom CSS or skins.
==Parameters==
* {{para|level}} or {{para|sub}} is the level number: valid values are 1 through 6. The default is 2 (equivalent of a <code><nowiki>== Main heading ==</nowiki></code> (level 1 is equivalent to page title).
* An unnamed parameter (which can also be specified as {{para|1}}) is used for the section title.
==Example==
<pre>
{{Pseudoheading|sub=1|Heading 1}}
{{Pseudoheading|sub=2|Heading 2}}
{{Pseudoheading|sub=3|Heading 3}}
{{Pseudoheading|sub=4|Heading 4}}
{{Pseudoheading|sub=5|Heading 5}}
{{Pseudoheading|sub=6|Heading 6}}
</pre>
{{Pseudoheading|sub=1|Heading 1}}
{{Pseudoheading|sub=2|Heading 2}}
{{Pseudoheading|sub=3|Heading 3}}
{{Pseudoheading|sub=4|Heading 4}}
{{Pseudoheading|sub=5|Heading 5}}
{{Pseudoheading|sub=6|Heading 6}}
<includeonly>
[[Category:templates]]
</includeonly>
ffa2c7843256f67edb39f33014a6fbd7fbb8a7ff
Template:Withdrawn
10
94
183
2023-01-16T22:50:23Z
devwiki>Pppery
0
wikitext
text/x-wiki
[[File:Cancelled process mini.svg|200x20px|link=|alt=]] '''{{{1|Request withdrawn}}}'''<noinclude>{{documentation}}</noinclude>
24c0cd218d3a61ac8b524c6f8d1b5cc405ca3d80
Template:Custom resolution
10
81
159
2023-01-16T22:51:28Z
devwiki>Pppery
0
wikitext
text/x-wiki
<span class="nowrap">[[File:{{{1|Cancelled process mini.svg}}}|18px|alt={{{2|Text here}}}]] <span style="{{{3|">'''{{{2|Text here}}}'''</span></span>
<noinclude>{{Documentation|content=
This template allows for the creation of custom [[Template:Template list#Resolution templates|resolution templates]] using 2 parameters.
}}[[Category:Resolution templates]]</noinclude>
a563b1f700886c4f97480a7ee81988b33af01ccf
Template:Information/style.css
10
122
237
2023-01-16T23:32:31Z
devwiki>Pppery
0
sanitized-css
text/css
.fileinfo-paramfield {
background: #ccf;
text-align: right;
padding-right: 0.4em;
width: 15%;
font-weight: bold;
}
/* [[Category:Template stylesheets]] */
396fcf8276bedcc9dad608bdbd9bf1be7f90424d
Template:Talk quote inline/styles.css
10
71
139
2023-01-16T23:32:41Z
devwiki>Pppery
0
sanitized-css
text/css
.inline-quote-talk {
font-family: Georgia, 'DejaVu Serif', serif;
color: #008560;
quotes: none;
}
.inline-quote-talk-italic {
font-family: inherit;
font-style: italic;
}
.inline-quote-talk-marks {
quotes: '"' '"';
}
/* [[Category:Template stylesheets]] */
4434a2aa81c34f55d7218b590243121c2f44b366
Category:Template stylesheets
14
59
115
2023-01-16T23:32:52Z
devwiki>Pppery
0
Created page with "[[Category:Templates]]"
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Module:Documentation/styles.css
828
25
47
2023-01-16T23:40:04Z
devwiki>Pppery
0
text
text/plain
.documentation,
.documentation-metadata {
border: 1px solid #a2a9b1;
background-color: #ecfcf4;
clear: both;
}
.documentation {
margin: 1em 0 0 0;
padding: 1em;
}
.documentation-metadata {
margin: 0.2em 0; /* same margin left-right as .documentation */
font-style: italic;
padding: 0.4em 1em; /* same padding left-right as .documentation */
}
.documentation-startbox {
padding-bottom: 3px;
border-bottom: 1px solid #aaa;
margin-bottom: 1ex;
}
.documentation-heading {
font-weight: bold;
font-size: 125%;
}
.documentation-clear { /* Don't want things to stick out where they shouldn't. */
clear: both;
}
.documentation-toolbar {
font-style: normal;
font-size: 85%;
}
/* [[Category:Template stylesheets]] */
5fb984fe8632dc068db16853a824c9f3d5175dd9
Module:String
828
124
241
2023-01-20T02:43:41Z
devwiki>Pppery
0
And this one too
Scribunto
text/plain
--[[
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
error_category: If an error occurs, specifies the name of a category to
include with the error message. The default category is
[Category:Errors reported by Module String].
no_category: If set to 'true' or 1, no category will be added if an error
is generated.
Unit tests for this module are available at Module:String/tests.
]]
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:String|len|target_string|}}
OR
{{#invoke:String|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} )
local s = new_args['s'] or ''
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:String|sub|target_string|start_index|end_index}}
OR
{{#invoke:String|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } )
local s = new_args['s'] or ''
local i = tonumber( new_args['i'] ) or 1
local j = tonumber( new_args['j'] ) or -1
local len = mw.ustring.len( s )
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1
end
if j < 0 then
j = len + j + 1
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' )
end
if j < i then
return str._error( 'String subset indices out of order' )
end
return mw.ustring.sub( s, i, j )
end
--[[
_match
This function returns a substring from the source string that matches a
specified pattern. It is exported for use in other modules
Usage:
strmatch = require("Module:String")._match
sresult = strmatch( s, pattern, start, match, plain, nomatch )
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
-- This sub-routine is exported for use in other modules
function str._match( s, pattern, start, match_index, plain_flag, nomatch )
if s == '' then
return str._error( 'Target string is empty' )
end
if pattern == '' then
return str._error( 'Pattern string is empty' )
end
start = tonumber(start) or 1
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' )
end
if match_index == 0 then
return str._error( 'Match index is out of range' )
end
if plain_flag then
pattern = str._escapePattern( pattern )
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start )
end
local iterator = mw.ustring.gmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table = {}
local count = 1
for w in iterator do
result_table[count] = w
count = count + 1
end
result = result_table[ count + match_index ]
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' )
else
return nomatch
end
else
return result
end
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
-- This is the entry point for #invoke:String|match
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} )
local s = new_args['s'] or ''
local start = tonumber( new_args['start'] ) or 1
local plain_flag = str._getBoolean( new_args['plain'] or false )
local pattern = new_args['pattern'] or ''
local match_index = math.floor( tonumber(new_args['match']) or 1 )
local nomatch = new_args['nomatch']
return str._match( s, pattern, start, match_index, plain_flag, nomatch )
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:String|pos|target_string|index_value}}
OR
{{#invoke:String|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} )
local target_str = new_args['target'] or ''
local pos = tonumber( new_args['pos'] ) or 0
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' )
end
return mw.ustring.sub( target_str, pos, pos )
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:String|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } )
local source_str = new_args['source'] or ''
local pattern = new_args['target'] or ''
local start_pos = tonumber(new_args['start']) or 1
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return 0
end
plain = str._getBoolean( plain )
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } )
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber( new_args['count'] )
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean( plain )
if plain then
pattern = str._escapePattern( pattern )
replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences.
end
local result
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count )
else
result = mw.ustring.gsub( source_str, pattern, replace )
end
return result
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
escapePattern
This function escapes special characters from a Lua string pattern. See [1]
for details on how patterns work.
[1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
Usage:
{{#invoke:String|escapePattern|pattern_string}}
Parameters
pattern_string: The pattern string to escape.
]]
function str.escapePattern( frame )
local pattern_str = frame.args[1]
if not pattern_str then
return str._error( 'No pattern string specified' )
end
local result = str._escapePattern( pattern_str )
return result
end
--[[
count
This function counts the number of occurrences of one string in another.
]]
function str.count(frame)
local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'})
local source = args.source or ''
local pattern = args.pattern or ''
local plain = str._getBoolean(args.plain or true)
if plain then
pattern = str._escapePattern(pattern)
end
local _, count = mw.ustring.gsub(source, pattern, '')
return count
end
--[[
endswith
This function determines whether a string ends with another string.
]]
function str.endswith(frame)
local args = str._getParameters(frame.args, {'source', 'pattern'})
local source = args.source or ''
local pattern = args.pattern or ''
if pattern == '' then
-- All strings end with the empty string.
return "yes"
end
if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then
return "yes"
else
return ""
end
end
--[[
join
Join all non empty arguments together; the first argument is the separator.
Usage:
{{#invoke:String|join|sep|one|two|three}}
]]
function str.join(frame)
local args = {}
local sep
for _, v in ipairs( frame.args ) do
if sep then
if v ~= '' then
table.insert(args, v)
end
else
sep = v
end
end
return table.concat( args, sep or '' )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {}
local index = 1
local value
for _, arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index]
index = index + 1
end
new_args[arg] = value
end
return new_args
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower()
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false
else
boolean_value = true
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str
else
error( 'No boolean value found' )
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
end
return str
73c9d229ca32cb5e05a3873238b69fec347cf4b1
Template:Soft redirect
10
60
117
2023-01-20T02:48:04Z
devwiki>Pppery
0
Drop categorization ([[customizing templattes|an assumption about the structure of the wiki]]), and clean up
wikitext
text/x-wiki
__NONEWSECTIONLINK__[[File:Softredirarrow.svg|64px|Soft redirect to:|link=]]<span class="redirectText" id="softredirect">[[:{{#invoke:String|match|1={{{1}}}|2=^:*(.-)$}}|{{{2|{{#invoke:String|match|1={{{1}}}|2=^:*(.-)$}}}}}]]</span><br /><span style="font-size:85%; padding-left:48px;">This page is a [[metawikimedia:soft redirect|soft redirect]].</span><noinclude>
{{Documentation}}
</noinclude>
a965c0fe43aa0fe8f0e17ed40d725f0e7b3649f6
Template:Soft redirect/doc
10
125
243
2023-01-20T02:52:48Z
devwiki>Pppery
0
Adhere to Dev Wiki standards
wikitext
text/x-wiki
{{Documentation subpage}}
== Summary ==
* This template is for creating [[metawikimedia:Soft redirect|soft redirects]], that is to say, short pages inviting readers to visit another page on a different wiki. In some cases, this cannot be performed with a classical redirect due to technical restrictions.
* This template is also used to redirect an entry to a [[mw:Help:Special page|special page]], in which case hard redirects have been disabled.
== Usage ==
=== Single parameter ===
<code><nowiki>{{</nowiki>Soft redirect|''target''}}</code>
'''Example'''
<code><nowiki>{{</nowiki>Soft redirect|Meta:Special:RequestWiki}}</code> will produce:
{{Soft redirect|Special:RequestWiki}}
===Two parameters===
<code><nowiki>{{</nowiki>Soft redirect|Special:RequestWiki|"Special:RequestWiki" on Meta}}</code>
'''Example'''
<code><nowiki>{{</nowiki>Soft redirect|Meta:Special:RequestWiki|"Special:RequestWiki" on Meta}}</code> will produce:
{{Soft redirect|Meta:Special:RequestWiki|"Special:RequestWiki" on Meta}}
<includeonly>[[Category:Templates]]</includeonly>
2588596738afc76eb9944ac61e29235c31d43ec7
Template:Template list
10
47
91
2023-02-09T23:48:27Z
devwiki>Pppery
0
wikitext
text/x-wiki
== Resolution templates ==
{{hatnote|Category: [[:Category:Resolution templates|Resolution templates]]}}
<section begin=resolution-templates/>
* {{tl|done}} - {{done}}
* {{tl|partly done}} - {{partly done}}
* {{tl|resolved}} - {{resolved}}
* {{tl|not done}} - {{not done}}
* {{tl|doing}} - {{doing}}
* {{tl|comment}} - {{comment}}
* {{tl|on hold}} - {{on hold}}
* {{tl|agree}} - {{agree}}
* {{tl|withdrawn}} - {{withdrawn}}
* {{tl|working}} - {{working}}
* {{tl|idea}} - {{idea}}
* {{tl|reviewing}} - {{reviewing}}
* {{tl|note}} - {{note}}
* {{tl|question}} - {{question}}
* {{tl|high priority}} - {{high priority}}
* {{tl|thank you}} - {{thank you}}
* {{tl|pending}} - {{pending}}
* {{tl|custom resolution}} - {{custom resolution|Earth Western Hemisphere transparent background.png|What on earth?}}
<section end=resolution-templates/>
== Voting templates ==
{{hatnote|Category: [[:Category:Voting templates|Voting templates]]}}
<section begin=voting-templates/>
* {{tl|support}} - {{support}}
* {{tl|oppose}} - {{oppose}}
* {{tl|abstain}} - {{abstain}}
* {{tl|neutral}} - {{neutral}}
<section end=voting-templates/>
== Social media userboxes ==
{{hatnote|Category: [[:Category:Social media userboxes|Social media userboxes]]}}
<section begin=social-media-userboxes/>
{| class="wikitable"
|-
<noinclude>! Template !! Result
|-</noinclude>
| {{tl|User discord}} || {{User discord|nocat=yes}}
|-
| {{tl|User github}} || {{User github|nocat=yes}}
|-
| {{tl|User instagram}} || {{User instagram|nocat=yes}}
|-
| {{tl|User IRC}} || {{User IRC|nocat=yes}}
|-
| {{tl|User twitter}} || {{User twitter|nocat=yes}}
|-
| {{tl|User wikimedia}} || {{User wikimedia|nocat=yes}}
|-
| {{tl|User youtube}} || {{User youtube|nocat=yes}}
|}
<section end=social-media-userboxes/>
[[Category:Templates| ]]
8e433f454d20d59b3b913e007e3d40f9e3c937eb
Template:If empty
10
29
55
2023-03-21T04:15:21Z
devwiki>Pppery
0
Rv
wikitext
text/x-wiki
<includeonly>{{{{{|safesubst:}}}#if:{{{1|}}}
| {{{1}}}
| {{{{{|safesubst:}}}#if:{{{2|}}}
| {{{2}}}
| {{{{{|safesubst:}}}#if:{{{3|}}}
| {{{3}}}
| {{{{{|safesubst:}}}#if:{{{4|}}}
| {{{4}}}
| {{{{{|safesubst:}}}#if:{{{5|}}}
| {{{5}}}
| {{{{{|safesubst:}}}#if:{{{6|}}}
| {{{6}}}
| {{{{{|safesubst:}}}#if:{{{7|}}}
| {{{7}}}
| {{{{{|safesubst:}}}#if:{{{8|}}}
| {{{8}}}
| {{{{{|safesubst:}}}#if:{{{9|}}}
| {{{9}}}
}}
}}
}}
}}
}}
}}
}}
}}
}}</includeonly><noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
eeda2c13231e9a8b44d480e8c429d73652575009
Template:If empty/doc
10
127
247
2023-03-21T04:24:54Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
This template is used inside other templates. It takes any number of parameters and returns the first found to be defined and non-empty. If none is found, nothing is returned. By writing <code><nowiki>{{if empty|a|b|c}}</nowiki></code> instead of <code><nowiki>{{#if:a|a|{{#if:b|b|c}}}}</nowiki></code>, expression a and b do not have to be repeated and evaluated twice. The template provides a fallback order, similar to a try catch based "It is easier to ask for forgiveness than permission" programming style.
Typical usage is like this:
: <code><nowiki>{{If empty |{{{logo|}}} |{{{image|}}} |{{{picture|}}} |default.svg}}</nowiki></code>
: <nowiki>("Return {{{logo|}}} if it has a value; else {{{image|}}} if it has a value; else {{{picture|}}} if it has a value; else return "default.svg".")</nowiki>
This returns the first of the parameters ''logo'', ''image'' and ''picture'' that is defined and non-empty, otherwise "default.svg".
===Rationale===
The MediaWiki parameter default function doesn't return the default value for empty parameters. That is, <code><nowiki>{{{logo|default.svg}}}</nowiki></code> does not return "default.svg" if the template was called like this: <code><nowiki>{{template|logo=}}</nowiki></code>.
The usual workaround for a single parameter is:
: <code><nowiki>{{#if:{{{logo|}}} |{{{logo}}} |default.svg}}</nowiki></code>
: <nowiki>("If {{{logo}}} has a value, return it, else return "default.svg".")</nowiki>
But this becomes complex when several parameters are to be checked:
: <code><nowiki>{{#if:{{{logo|}}} |{{{logo}}} |{{#if:{{{image|}}} |{{{image}}} |{{#if:{{{picture|}}} |{{{picture}}} |default.svg}} }} }}</nowiki></code>
: <nowiki>("If {{{logo}}} has a value, return it; else if {{{image}}} has a value, return that; else if {{{picture}}} has a value, return that; else return "default.svg".")</nowiki>
In these cases, {{tl|if empty}} produces the simpler syntax (as above):
: <code><nowiki>{{if empty |{{{logo|}}} |{{{image|}}} |{{{picture|}}} |default.svg}}</nowiki></code>
====Piping====
Parameters used with {{tl|if empty}} must be piped – i.e. include the vertical bar (pipe) symbol (" | ") as a trailing character – so that empty or undefined parameters aren't treated as text and returned incorrectly. Hence, for example, <code><nowiki>{{{logo|}}}</nowiki></code>, <code><nowiki>{{{image|}}}</nowiki></code> and <code><nowiki>{{{picture|}}}</nowiki></code> rather than {{para|logo}}, {{para|image}} and {{para|picture}} in the above examples.
===Examples===
* {{tlx|if empty}}-> Returns an empty string.
* {{tlx|if empty|one}} -> {{if empty|one}} Returns the first parameter that is defined and not empty.
* {{tlx|if empty|one|two}} > {{if empty|one|two}}
* {{tlx|if empty|one|two|three|four}} -> {{if empty|one|two|three|four}}
* {{tlx|if empty||two}} -? {{if empty||two}} The first parameter is empty/undefined, so is passed over.
* {{tlx|if empty||two|three|four}} -> {{if empty||two|three|four}}
* {{tlx|if empty||two||four}} -> {{if empty||two||four}} |
* {{tlx|if empty{{!}}}} -> The only parameter is empty or undefined, so returns an empty string.
* {{tlx|if empty|{{!}}{{!}}{{!}}{{!}}}} -> {{if empty||||}} Returns an empty string.
* <code><nowiki>{{if empty|{{{1|}}}|{{{2|}}}|three}}</nowiki></code> -> {{if empty|{{{1|}}}|{{{2|}}}|three}}
* <code><nowiki>{{if empty|{{{1}}}|{{{2}}}|three}}</nowiki></code> -> {{if empty|{{{1}}}|{{{2}}}|three}} (No pipe-characters following the names of the first two parameters ("1" and "2"), so the first of these returned as text ("{{{1}}}")).
* <code><nowiki>{{if empty|{{{logo|}}}|two}}</nowiki></code> -> {{if empty|{{{logo|}}}|two}}
* <code><nowiki>{{if empty|{{{logo}}}|two}}</nowiki></code> -> {{if empty|{{{logo}}}|two}} (No pipe-character following the parameter name "logo", so the text "{{{logo}}}" returned.)
* <code><nowiki>{{if empty|p=q}}</nowiki></code> -> {{if empty|p=q}} (The template identifies the parameters it receives as parameters 1 to 9, not using names such as "p", etc.)
<includeonly>
[[Category:Templates]]
</includeonly>
75e5d5cddcaf1ba848805c14282fb1f2177d36ac
Template:Infobox character/doc
10
126
245
2023-03-21T04:33:54Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
'''Infobox character''' is used to create an infobox for a fictional character of any type.
== Usage ==
The blank form immediately below shows the most commonly used fields, and complete instructions are listed further down the page.
{{Infobox character
| name = {{{name}}}
| series = {{{series}}}
| image = {{{image}}}
| alt = {{{alt}}}
| caption = {{{caption}}}
| first_major = {{{first_major}}}
| first_minor = {{{first_minor}}}
| first_date = {{{first_date}}}
| last_major = {{{last_major}}}
| last_minor = {{{last_minor}}}
| last_date = {{{last_date}}}
| creator = {{{creator}}}
| based_on = {{{based_on}}}
| adapted_by = {{{adapted_by}}}
| designer = {{{designer}}}
| portrayer = {{{portrayer}}}
| voice = {{{voice}}}
| motion_actor = {{{motion_actor}}}
| full_name = {{{full_name}}}
| nickname = {{{nickname}}}
| alias = {{{alias}}}
| species = {{{species}}}
| gender = {{{gender}}}
| title = {{{title}}}
| occupation = {{{occupation}}}
| affiliation = {{{affiliation}}}
| fighting_style = {{{fighting_style}}}
| weapon = {{{weapon}}}
| family = {{{family}}}
| spouse = {{{spouse}}}
| significant_other = {{{significant_other}}}
| children = {{{children}}}
| relatives = {{{relatives}}}
| religion = {{{religion}}}
| origin = {{{origin}}}
| nationality = {{{nationality}}}
}}
<syntaxhighlight lang="html" style="overflow:auto">{{Infobox character
| color = <!-- headers background color; the foreground color is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| image =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| first = <!-- Use instead of first_major= etc. when custom or complex formatting is needed. -->
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| last = <!-- Use instead of last_major= etc. when custom or complex formatting is needed. -->
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
}}</syntaxhighlight>
== Parameters ==
All parameters are optional.
{| class="wikitable"
|-
! scope="col" | Parameter
! scope="col" | Notes
|-
! scope="row" | color
| Background color for header bars (default = #DEDEE2). The text color is automatically determined. Must meet AAA compliance standards outlines on [[WP:COLOR]].
|-
! scope="row" | name
| Character name to display in top header (default = PAGENAME).
|-
! scope="row" | series
| Name of the series in which the character appears.
|-
! scope="row" | franchise
| Name of the fictional world or story in which the character appears. Does not italicize title.
|-
! scope="row" | multiple
| Set to yes if the infobox describes more than one character.
|-
! scope="row" | image
| Image of the character. "File:" and wikilinking is not required. i.e. use {{para|image|Example.png}}.
|-
! scope="row" | image_upright
| The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px.
|-
! scope="row" | alt
| Alt text for image
|-
! scope="row" | caption
| A caption explaining the image.
|-
! scope="row" | first_major
| The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | first_minor
| The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | first_issue
| The number of the comic book issue the fictional element first appeared in.
|-
! scope="row" | first_date
| The date of the publication/release of the minor work where the fictional element first appeared in.
|-
! scope="row" | last_major
| The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | last_minor
| The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | last_issue
| The number of the comic book issue the fictional element last appeared in.
|-
! scope="row" | last_date
| The date of the publication/release of the minor work where the fictional element last appeared in.
|-
! scope="row" | first
| First appearance of the character.
|-
! scope="row" | firstgame
| First appearance in a game of the character.
|-
! scope="row" | last
| Last appearance of the character.
|-
! scope="row" | creator
| Name of the individuals who are credited with the creation of the character.
|-
! scope="row" | based_on
| Name of the original character the adaptation is based on. Use this field in conjunction with {{para|adapted_by}}.
|-
! scope="row" | adapted_by
| Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character.
|-
! scope="row" | designer
| Name of the individuals who designed the character.
|-
! scope="row" | portrayer
| Name of the individuals who portrayed the character.
|-
! scope="row" | voice
| Name of the individuals who voiced the character. Should be omitted if the same as "portrayer".
|-
! scope="row" | motion_actor
| Name of the individuals who portrayed the character in motion capture.
|-
! scope="row" | noinfo
| Disable the first "In-universe information" header.
|-
! scope="row" | info-hdr
| Text for display in second header (default = Information).
|-
! scope="row" | full_name
| The character's full name.
|-
! scope="row" | nickname/nicknames
| Any nicknames used by the character.
|-
! scope="row" | alias/aliases
| Any aliases used by the character.
|-
! scope="row" | species/race
| The species or race of the character. Use for non-human characters only.
|-
! scope="row" | gender
| The gender of the character. Use only if not obvious.
|-
! scope="row" | title
| Titles the character was known by.
|-
! scope="row" | occupation/position
| The character's job or role.
|-
! scope="row" | class
| The character class for RPG characters.
|-
! scope="row" | affiliation
| The groups or teams the character belongs to.
|-
! scope="row" | alignment
| The character's Dungeons & Dragons alignment.
|-
! scope="row" | fighting_style
| The primary fighting styles used by the character.
|-
! scope="row" | weapon
| The types of weapons the character uses.
|-
! scope="row" | family
| The character's family members.
|-
! scope="row" | spouse/spouses
| The character's spouses.
|-
! scope="row" | significant_other/significant_others
| The character's significant others.
|-
! scope="row" | children
| The characters's children.
|-
! scope="row" | relatives
| The characters's relatives.
|-
! scope="row" | religion
| The character's religion.
|-
! scope="row" | origin/home
| The character's place of origin.
|-
! scope="row" | nationality
| The character's nationality.
|-
! scope="row" | extra-hdr
| Text for display in third header (default = No third header).
|-
! scope="row" | lbl#
| Label to display in left column where "#" is 1-5, 21-25, or 31-35 for custom fields under the 1st, 2nd, or 3rd headers respectively.
|-
! scope="row" | data#
| Text to display in the right column corresponding to the appropriate "lbl#".
|}
===TemplateData===
<templatedata>
{
"description": "Creates an infobox for a fictional character of any type.",
"params": {
"color": {
"label": "Color",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Background color for header bars (default = #DEDEE2). The text color is automatically computed. Must meet AAA compliance standards outlines on [[WP:COLOR]].",
"aliases": [
"colour"
]
},
"name": {
"label": "Name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Character name to display in top header (default = PAGENAME)."
},
"series": {
"label": "Series",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the series in which the character appears."
},
"franchise": {
"label": "Franchise",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the fictional world or story in which the character appears. Does not italicize title."
},
"multiple": {
"label": "Multiple",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Set to yes if the infobox describes more than one character."
},
"image": {
"label": "Image",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Image of the character. \"File:\" and wikilinking is not required. i.e. use {{para|image|Example.png}}."
},
"image_upright": {
"label": "Image upright",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px."
},
"alt": {
"label": "Alt",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Alt text for image per [[WP:MOSALT]]."
},
"caption": {
"label": "Caption",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A caption explaining the image."
},
"first_major": {
"label": "First appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games."
},
"first_minor": {
"label": "First appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"first_issue": {
"label": "First appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element first appeared in."
},
"first_date": {
"label": "First appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element first appeared in."
},
"last_major": {
"label": "Last appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games."
},
"last_minor": {
"label": "Last appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"last_issue": {
"label": "Last appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element last appeared in."
},
"last_date": {
"label": "Last appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element last appeared in."
},
"first": {
"label": "First appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance of the character."
},
"firstgame": {
"label": "First game",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance in a game of the character."
},
"last": {
"label": "Last appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Last appearance of the character."
},
"creator": {
"label": "Creator",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who are credited with the creation of the character."
},
"based_on": {
"label": "Based on",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the original character the adaptation is based on. Use {{based on}} to add the title of original character and the names of the original creators. Use this field in conjunction with {{para|adapted_by}}."
},
"adapted_by": {
"label": "Adapted by",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character."
},
"designer": {
"label": "Designer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who designed the character."
},
"portrayer": {
"label": "Portrayer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character."
},
"voice": {
"label": "Voice actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who voiced the character (if different from portrayer or there is no portrayer)"
},
"motion_actor": {
"label": "Motion actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character in motion capture."
},
"lbl1": {
"label": "Label 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Label to display in left column for custom fields under the 1st header."
},
"data1": {
"label": "Data 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text to display in the right column corresponding to lbl1."
},
"lbl2": {
"label": "Label 2",
"inherits": "lbl1"
},
"data2": {
"label": "Data 2",
"description": "Text to display in the right column corresponding to lbl2.",
"inherits": "data1"
},
"lbl3": {
"label": "Label 3",
"inherits": "lbl1"
},
"data3": {
"label": "Data 3",
"description": "Text to display in the right column corresponding to lbl3.",
"inherits": "data1"
},
"lbl4": {
"label": "Label 4",
"inherits": "lbl1"
},
"data4": {
"label": "Data 4",
"description": "Text to display in the right column corresponding to lbl4.",
"inherits": "data1"
},
"lbl5": {
"label": "Label 5",
"inherits": "lbl1"
},
"data5": {
"label": "Data 5",
"description": "Text to display in the right column corresponding to lbl5.",
"inherits": "data1"
},
"noinfo": {
"label": "Disable second header",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Disable the first \"In-universe information\" header."
},
"info-hdr": {
"label": "Second header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in second header (default = Information)."
},
"full_name": {
"label": "Full name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's full name."
},
"nickname": {
"label": "Nickname",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A nickname used by the character. If there is more than one nickname, use {{para|nicknames}}."
},
"nicknames": {
"label": "Nicknames",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any nicknames used by the character. If there is only one nickname, use {{para|nickname}}."
},
"alias": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "An alias used by the character. If there is more than one alias, use {{para|aliases}}."
},
"aliases": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any aliases used by the character. If there is only one alias, use {{para|alias}}."
},
"species": {
"label": "Species",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The species of the character. Use for non-human characters only."
},
"race": {
"label": "Race",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The race of the character. Use for non-human characters only."
},
"gender": {
"label": "Gender",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The gender of the character. Use only if not obvious."
},
"title": {
"label": "Title",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Titles the character was known by."
},
"occupation": {
"label": "Occupation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"position": {
"label": "Position",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"class": {
"label": "Class",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character class for RPG characters."
},
"affiliation": {
"label": "Affiliation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The groups or teams the character belongs to."
},
"alignment": {
"label": "Alignment",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's Dungeons & Dragons alignment."
},
"fighting_style": {
"label": "Fighting style",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The primary fighting styles used by the character."
},
"weapon": {
"label": "Weapon",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The types of weapons the character uses."
},
"family": {
"label": "Family",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's family members."
},
"spouse": {
"label": "Spouse",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"spouses": {
"label": "Spouses",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"significant_other": {
"label": "Significant other",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is more than one significant_other, use {{para|significant_others}}."
},
"significant_others": {
"label": "Significant others",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is only one significant_other, use {{para|significant_other}}."
},
"children": {
"label": "Children",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's children"
},
"relatives": {
"label": "Relatives",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's relatives"
},
"religion": {
"label": "Religion",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's religion"
},
"origin": {
"label": "Origin",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"home": {
"label": "Home",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"nationality": {
"label": "Nationality",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's nationality."
},
"lbl21": {
"label": "Label 21",
"description": "Label to display in left column for custom fields under the 2nd header.",
"inherits": "lbl1"
},
"data21": {
"label": "Data 21",
"description": "Text to display in the right column corresponding to lbl21.",
"inherits": "data1"
},
"lbl22": {
"label": "Label 22",
"inherits": "lbl21"
},
"data22": {
"label": "Data 22",
"description": "Text to display in the right column corresponding to lbl22.",
"inherits": "data1"
},
"lbl23": {
"label": "Label 23",
"inherits": "lbl21"
},
"data23": {
"label": "Data 23",
"description": "Text to display in the right column corresponding to lbl23.",
"inherits": "data1"
},
"lbl24": {
"label": "Label 24",
"inherits": "lbl21"
},
"data24": {
"label": "Data 24",
"description": "Text to display in the right column corresponding to lbl24.",
"inherits": "data1"
},
"lbl25": {
"label": "Label 25",
"inherits": "lbl21"
},
"data25": {
"label": "Data 25",
"description": "Text to display in the right column corresponding to lbl25.",
"inherits": "data1"
},
"extra-hdr": {
"label": "Third header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in third header (default = No third header)."
},
"lbl31": {
"label": "Label 31",
"description": "Label to display in left column for custom fields under the 3rd header.",
"inherits": "lbl22"
},
"data31": {
"label": "Data 31",
"description": "Text to display in the right column corresponding to lbl31.",
"inherits": "data1"
},
"lbl32": {
"label": "Label 32",
"inherits": "lbl31"
},
"data32": {
"label": "Data 32",
"description": "Text to display in the right column corresponding to lbl32.",
"inherits": "data1"
},
"lbl33": {
"label": "Label 33",
"inherits": "lbl31"
},
"data33": {
"label": "Data 33",
"description": "Text to display in the right column corresponding to lbl33.",
"inherits": "data1"
},
"lbl34": {
"label": "Label 34",
"inherits": "lbl31"
},
"data34": {
"label": "Data 34",
"description": "Text to display in the right column corresponding to lbl34.",
"inherits": "data1"
},
"lbl35": {
"label": "Label 35",
"inherits": "lbl31"
},
"data35": {
"label": "Data 35",
"description": "Text to display in the right column corresponding to lbl35.",
"inherits": "data1"
}
},
"format": "block"
}
</templatedata>
=== All parameters (not for general use) ===
<pre>{{Infobox character
| color = <!-- headers background colour; the foreground colour is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| multiple =
| image =
| image_upright =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| first =
| firstgame =
| last =
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| lbl1 =
| data1 =
| lbl2 =
| data2 =
| lbl3 =
| data3 =
| lbl4 =
| data4 =
| lbl5 =
| data5 =
| noinfo =
| info-hdr =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
| lbl21 =
| data21 =
| lbl22 =
| data22 =
| lbl23 =
| data23 =
| lbl24 =
| data24 =
| lbl25 =
| data25 =
| extra-hdr =
| lbl31 =
| data31 =
| lbl32 =
| data32 =
| lbl33 =
| data33 =
| lbl34 =
| data34 =
| lbl35 =
| data35 =
}}</pre>
== Example ==
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
<syntaxhighlight lang="moin">
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
</syntaxhighlight>
<includeonly>
[[Category:Templates]]
</includeonly>
c3b5673c7b9ea096939919c0cf7da9d3440d78e7
Template:User twitter
10
105
203
2023-05-01T07:22:40Z
devwiki>MLastCelebration
0
Allow the first unnamed parameter ({{{1}}}) as a substitute for {{{account}}}, to align with [[wikipedia:Template:User twitter]]'s usage
wikitext
text/x-wiki
{{Userbox
| id = [[File:Twitter-logo.svg|frameless|upright=0.1]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} tweets on Twitter{{#if:{{{account|{{{1|}}}}}}| as [https://twitter.com/{{{account|{{{1}}}}}} '''@{{{account|{{{1}}}}}}''']|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use Twitter
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
58e5f4979e17a891445f4f463a9d7cc90b58166b
Burglar
0
4
4
2023-05-28T17:03:10Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
wikitext
text/x-wiki
{{Character|name=Burglar|image=Burglar.png|imagecaption=Burglar when you 1st encounter him in Gather Mode, Survival Mode and Story Mode.|species=Human|gender=Male|eyes=|portrayedby=Voicemod|appearsin=Gather Mode, Survival Mode and Story Mode|debut=Baldi's Basics In Special Things}}
'''Burglar''' is a side character that appears right when it is about to turn night time! He likes to steal crowbars and break windows most of the time.
== Appearance ==
The Burglar appears as a faceless man wearing blue jeans, a black sweatshirt, a visor-like black mask, and greyish shoes.
== Mechanics ==
=== Gather Mode ===
Once Baldi leaves the school for the night, you have to go to the School Faculty Only room on the right side of the schoolhouse, where a crowbar will be waiting for you to pick it up. The Burglar will then start randomly walking with the crowbar and breaking windows. He will start running from you upon getting the Burglar Bonker.
=== '''Survival Mode''' ===
He doesn't really serve any purpose in Survival Mode besides running around the school and breaking windows.
=== '''Story Mode''' ===
He appears in the Alternative ending upon getting the first camera piece. He breaks from the roof and begins chasing you, just like the Baldi AI. When getting all six cameras, he disappears and will eventually spawn in the classroom, which he has no AI at that point.
== Gallery ==
<gallery>
File:BurglarBonked.png|Burglar being bonked by the player during the end of Gather Mode.
File:BurglarNoCrowbar.png|Burglar without his crowbar at the end of Story Modes alterative ending.
File:BurglarDeleted.gif|Burglar getting deleted in the alterative ending of Story Mode
File:BurglarUnDithered.png|Undithered image of Burglar.
</gallery>
== Audio ==
[[File:Burglar Crowbar.mp3|thumb|Burglar when he steals the crowbar from the player in Classic Mode: Gather Mode|left]]
[[Category:Characters]]
[[File:Burglar Random.mp3|left|thumb|Burglar says this voice line at random when breaking the windows in Gather Mode and Survival Mode.]]
[[File:Burglar IwantCrowbar.mp3|left|thumb|Burglar when encountering him in story mode, alternative ending.]]
[[File:Burglar CantCatch.mp3|left|thumb|Burglar when the player gets the Burglar Bonker in Classic Mode: Gather Mode]]
[[File:Burglar Caught.mp3|left|thumb|Burglar when getting bonked with the Burglar Bonker in Classic Mode: Gather Mode]]
[[File:Burglar Defeated.mp3|left|thumb|Burglar giving up his crowbar in Classic Mode: Story Mode]]
[[File:Burglar Run.mp3|left|thumb|An '''''<big>UNUSED</big>''''' voiceline of Burglar when the player gets the Burglar Bonker in Classic Mode: Gather Mode]]
51c04b24a8ae3d0d7c0762f2536e2c0c42eec897
The Scorge
0
6
6
2023-07-25T21:48:30Z
98.40.144.50
0
wikitext
text/x-wiki
{{Character|name=The Scorge|species=Nightmare|gender=Male|eyes=Void|portrayedby=Baldi|appearsin=Gather Mode, Survival Mode, and Story Mode of Classic Mode|image=File:ScorgeWalk.gif|debut=Baldi's Basics In Special Things}}
'''The Scorge''' is a nightmare that appears only during the night and slowly moves around the hallways, mainly observing.
== Appearance ==
It is a red-like [[Baldi]] Ghost but with void-like eyes and a disconnected jaw with another Baldi head in his mouth. The creature lacks any kind of legs and instead has a red tail that waves around in its animation.
== Mechanics ==
Most of the time, it just roams around and, upon contact, will kill you; but in Story Mode, once you get all six think pads, he turns the whole school red (like almost done with the 1st half of gather mode or triggering smile assistant event) ,and chases you down really fast.
== Gallery ==
<gallery>
File:ScorgeTransition.gif|The Scorge when collecting all 6 Thinkpads
</gallery>
1c0ab45b529ea12e635a78c2ec37ba8bd3415ee0
Module:Formatted appearance
828
30
57
2023-08-31T04:21:25Z
devwiki>Pppery
0
Typo
Scribunto
text/plain
-- This module requires the use of Module:List.
local p = {}
-- Local function which is used to get a correctly formatted entry.
-- Function checks if the array had a value added by checking the counter,
-- and returns the relevant result.
local function getFormattedEntry(args, counter)
if (counter == 1) then -- Check if the counter stayed the same.
return "" -- Nothing was added to array; Return empty string.
elseif (counter == 2) then -- Check if only one value was added to the array.
return args[1] -- Only one value was added to array; Return that value.
else -- The array had more than one value added.
return table.concat(args, "<br/>") -- Retrieve the formatted plainlist.
end
end
--[[
Local function which is used to format an appearance for a comic book,
in the style of:
Line 1: <comic book title> #<issue number> (with comic book title in italics)
Line 2: <release date>
For other usages, see createGenericEntry().
The function works with the following combinations:
-- Only comic book title (example: "The Incredible Hulk").
-- Title and issue number (example: "The Incredible Hulk" and "181").
-- Title and release date (example: "The Incredible Hulk and "November 1974").
-- Title, issue number and release date (example: "The Incredible Hulk", "181" and "November 1974").
-- Only release date (example: "November 1974").
--]]
local function createComicEntry(appearanceMajor, appearanceMinor, appearanceDate)
local fullString = {} -- Variable to save the array.
local counter = 1 -- Variable to save the array counter.
if (appearanceMajor ~= nil) then -- Check if a comic book title was entered.
if (appearanceMinor == nil) then -- A comic book title was entered; Check if a issue number was entered.
fullString[counter] = appearanceMajor -- A issue was not entered; Add only the comic book title to the array.
counter = counter + 1 -- Increment counter by one.
else
fullString[counter] = appearanceMajor .. " " .. appearanceMinor -- A issue was entered; Add both to the array.
counter = counter + 1 -- Increment counter by one.
end
end
if (appearanceDate ~= nil) then -- Check if a release date was entered.
fullString[counter] = appearanceDate -- A release date was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry.
end
--[[
Local function which is used to format an appearance for most usages,
including television, film, books, songs and games, in the style of:
Line 1: <minor work title> (in quotes) (Minor works include: TV episodes, chapters, songs and game missions)
Line 2: <major work title> (in italics) (Major works include: TV series, films, books, albums and games)
Line 3: <release date>
For comic book usages, see createComicEntry().
The function works with the following combinations:
-- Only minor work title (example: "Live Together, Die Alone").
-- Minor work title and major work title (example: "Live Together, Die Alone" and "Lost").
-- Minor work title and release date (example: "Live Together, Die Alone" and "May 24, 2006").
-- Minor work title, major work title and release date (example: "Live Together, Die Alone", "Lost" and "May 24, 2006").
-- Only major work title (example: "Lost").
-- major work title and release date (example: "Lost" and "May 24, 2006").
-- Only release date (example: "May 24, 2006").
--]]
local function createGenericEntry(appearanceMajor, appearanceMinor, appearanceDate)
local fullString = {} -- Variable to save the array.
local counter = 1 -- Variable to save the array counter.
if (appearanceMinor ~= nil) then -- Check if a minor appearance was entered.
fullString[counter] = appearanceMinor -- A minor appearance was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
if (appearanceMajor ~= nil) then -- Check if a major appearance was entered.
fullString[counter] = appearanceMajor -- A major appearance was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
if (appearanceDate ~= nil) then -- Check if a release date was entered.
fullString[counter] = appearanceDate -- A release date was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry.
end
-- Local function which is used to format with a hash symbol comic book issues.
-- For other minor works, see getFormattedGenericMinorWork().
local function getFormattedComicMinorWorkTitle(issue)
if (issue ~= nil) then -- Check if the issue is not nil.
if (string.find(issue, "#")) then -- Check if the issue already has a hash symbol.
return issue -- Hash symbol already present; Return issue.
else
local formattedString = string.gsub(issue, "%d+", "#%1") -- Hash symbol not found; Add the symbol before the issue number.
return formattedString -- Return issue.
end
else
return nil -- issue is nil; Return nil.
end
end
-- Local function which is used to format with quotes a minor work title of most types.
-- For comic book issues, see getFormattedComicMinorWork() (see [MOS:MINORWORK]).
local function getFormattedGenericMinorWorkTitle(title)
if (title ~= nil) then -- Check if the title is not nil.
return "\"" .. title .. "\"" -- Title is not nil; Add quotes to the title.
else
return nil -- Title is nil; Return nil.
end
end
-- Local function which is used to format with italics a major work title (see [MOS:MAJORWORK]).
local function getFormattedMajorWorkTitle(title)
if (title ~= nil) then -- Check if the title is not nil.
return "''" .. title .. "''" -- Title is not nil; Add italics to the title.
else
return nil -- Title is nil; Return nil.
end
end
-- Local function which does the actual main process.
local function _getFormattedAppearance(args)
local appearanceMajor = args['major_work'] -- Get the title of the major work.
local appearanceMinor = args['minor_work'] -- Get the title of the minor work.
local isComic = false -- Variable to save the status of wether the appearence is from a comic book.
if (args['issue'] ~= nil) then -- Check if the comic specific issue is not nil.
appearanceMinor = args['issue'] -- Issue is not nil; Get the issue number.
isComic = true -- Set isComic to true.
end
local appearanceDate = args['date'] -- Get the release date of the minor work.
local formattedAppearanceMajor = getFormattedMajorWorkTitle(appearanceMajor) -- Call getFormattedMajorWorkTitle() to get a formatted major work title.
if (isComic == false) then -- Check if the appearance is a comic book appearance.
-- The appearance is not a comic book appearance;
local formattedAppearanceMinor = getFormattedGenericMinorWorkTitle(appearanceMinor) -- Call getFormattedGenericMinorWorkTitle() to get a formatted minor work title.
return createGenericEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createGenericEntry() to create an appearance entry.
else
-- The appearance is a comic book appearance.
local formattedAppearanceMinor = getFormattedComicMinorWorkTitle(appearanceMinor) -- Call getFormattedComicMinorWorkTitle() to get a formatted minor work title.
return createComicEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createComicEntry() to create a comic book appearance entry.
end
end
--[[
Public function which is used to format the |first_appeared= and |last_appeared= fields.
The usage of this module allows for correct title formatting (see [MOS:MAJORWORK] and [MOS:MINORWORK]),
and correct line breaks based on guidelines (see [WP:UBLIST]).
Parameters:
-- |major_work= — optional; The title of the major work the fictional element appeared in.
Major works include TV series, films, books, albums and games.
-- |minor_work= — optional; The title of the minor work the fictional element appeared in.
Minor works include TV episodes, chapters, songs and game missions.
-- |issue= — optional; The number of the comic book issue the fictional element appeared in.
-- |date= — optional; The date of the publication/release of the minor work where the fictional element appeared in.
--]]
function p.getFormattedAppearance(frame)
local getArgs = require('Module:Arguments').getArgs -- Use Module:Arguments to access module arguments.
local args = getArgs(frame) -- Get the arguments sent via the template.
return _getFormattedAppearance(args) -- Call _getFormattedAppearance() to perform the actual process.
end
return p
801fe2d9de9c3eb00e60fd962b6450e0ab1adc0f
58
57
2024-02-01T19:24:30Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- This module requires the use of Module:List.
local p = {}
-- Local function which is used to get a correctly formatted entry.
-- Function checks if the array had a value added by checking the counter,
-- and returns the relevant result.
local function getFormattedEntry(args, counter)
if (counter == 1) then -- Check if the counter stayed the same.
return "" -- Nothing was added to array; Return empty string.
elseif (counter == 2) then -- Check if only one value was added to the array.
return args[1] -- Only one value was added to array; Return that value.
else -- The array had more than one value added.
return table.concat(args, "<br/>") -- Retrieve the formatted plainlist.
end
end
--[[
Local function which is used to format an appearance for a comic book,
in the style of:
Line 1: <comic book title> #<issue number> (with comic book title in italics)
Line 2: <release date>
For other usages, see createGenericEntry().
The function works with the following combinations:
-- Only comic book title (example: "The Incredible Hulk").
-- Title and issue number (example: "The Incredible Hulk" and "181").
-- Title and release date (example: "The Incredible Hulk and "November 1974").
-- Title, issue number and release date (example: "The Incredible Hulk", "181" and "November 1974").
-- Only release date (example: "November 1974").
--]]
local function createComicEntry(appearanceMajor, appearanceMinor, appearanceDate)
local fullString = {} -- Variable to save the array.
local counter = 1 -- Variable to save the array counter.
if (appearanceMajor ~= nil) then -- Check if a comic book title was entered.
if (appearanceMinor == nil) then -- A comic book title was entered; Check if a issue number was entered.
fullString[counter] = appearanceMajor -- A issue was not entered; Add only the comic book title to the array.
counter = counter + 1 -- Increment counter by one.
else
fullString[counter] = appearanceMajor .. " " .. appearanceMinor -- A issue was entered; Add both to the array.
counter = counter + 1 -- Increment counter by one.
end
end
if (appearanceDate ~= nil) then -- Check if a release date was entered.
fullString[counter] = appearanceDate -- A release date was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry.
end
--[[
Local function which is used to format an appearance for most usages,
including television, film, books, songs and games, in the style of:
Line 1: <minor work title> (in quotes) (Minor works include: TV episodes, chapters, songs and game missions)
Line 2: <major work title> (in italics) (Major works include: TV series, films, books, albums and games)
Line 3: <release date>
For comic book usages, see createComicEntry().
The function works with the following combinations:
-- Only minor work title (example: "Live Together, Die Alone").
-- Minor work title and major work title (example: "Live Together, Die Alone" and "Lost").
-- Minor work title and release date (example: "Live Together, Die Alone" and "May 24, 2006").
-- Minor work title, major work title and release date (example: "Live Together, Die Alone", "Lost" and "May 24, 2006").
-- Only major work title (example: "Lost").
-- major work title and release date (example: "Lost" and "May 24, 2006").
-- Only release date (example: "May 24, 2006").
--]]
local function createGenericEntry(appearanceMajor, appearanceMinor, appearanceDate)
local fullString = {} -- Variable to save the array.
local counter = 1 -- Variable to save the array counter.
if (appearanceMinor ~= nil) then -- Check if a minor appearance was entered.
fullString[counter] = appearanceMinor -- A minor appearance was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
if (appearanceMajor ~= nil) then -- Check if a major appearance was entered.
fullString[counter] = appearanceMajor -- A major appearance was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
if (appearanceDate ~= nil) then -- Check if a release date was entered.
fullString[counter] = appearanceDate -- A release date was entered; Add it to the array.
counter = counter + 1 -- Increment counter by one.
end
return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry.
end
-- Local function which is used to format with a hash symbol comic book issues.
-- For other minor works, see getFormattedGenericMinorWork().
local function getFormattedComicMinorWorkTitle(issue)
if (issue ~= nil) then -- Check if the issue is not nil.
if (string.find(issue, "#")) then -- Check if the issue already has a hash symbol.
return issue -- Hash symbol already present; Return issue.
else
local formattedString = string.gsub(issue, "%d+", "#%1") -- Hash symbol not found; Add the symbol before the issue number.
return formattedString -- Return issue.
end
else
return nil -- issue is nil; Return nil.
end
end
-- Local function which is used to format with quotes a minor work title of most types.
-- For comic book issues, see getFormattedComicMinorWork() (see [MOS:MINORWORK]).
local function getFormattedGenericMinorWorkTitle(title)
if (title ~= nil) then -- Check if the title is not nil.
return "\"" .. title .. "\"" -- Title is not nil; Add quotes to the title.
else
return nil -- Title is nil; Return nil.
end
end
-- Local function which is used to format with italics a major work title (see [MOS:MAJORWORK]).
local function getFormattedMajorWorkTitle(title)
if (title ~= nil) then -- Check if the title is not nil.
return "''" .. title .. "''" -- Title is not nil; Add italics to the title.
else
return nil -- Title is nil; Return nil.
end
end
-- Local function which does the actual main process.
local function _getFormattedAppearance(args)
local appearanceMajor = args['major_work'] -- Get the title of the major work.
local appearanceMinor = args['minor_work'] -- Get the title of the minor work.
local isComic = false -- Variable to save the status of wether the appearence is from a comic book.
if (args['issue'] ~= nil) then -- Check if the comic specific issue is not nil.
appearanceMinor = args['issue'] -- Issue is not nil; Get the issue number.
isComic = true -- Set isComic to true.
end
local appearanceDate = args['date'] -- Get the release date of the minor work.
local formattedAppearanceMajor = getFormattedMajorWorkTitle(appearanceMajor) -- Call getFormattedMajorWorkTitle() to get a formatted major work title.
if (isComic == false) then -- Check if the appearance is a comic book appearance.
-- The appearance is not a comic book appearance;
local formattedAppearanceMinor = getFormattedGenericMinorWorkTitle(appearanceMinor) -- Call getFormattedGenericMinorWorkTitle() to get a formatted minor work title.
return createGenericEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createGenericEntry() to create an appearance entry.
else
-- The appearance is a comic book appearance.
local formattedAppearanceMinor = getFormattedComicMinorWorkTitle(appearanceMinor) -- Call getFormattedComicMinorWorkTitle() to get a formatted minor work title.
return createComicEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createComicEntry() to create a comic book appearance entry.
end
end
--[[
Public function which is used to format the |first_appeared= and |last_appeared= fields.
The usage of this module allows for correct title formatting (see [MOS:MAJORWORK] and [MOS:MINORWORK]),
and correct line breaks based on guidelines (see [WP:UBLIST]).
Parameters:
-- |major_work= — optional; The title of the major work the fictional element appeared in.
Major works include TV series, films, books, albums and games.
-- |minor_work= — optional; The title of the minor work the fictional element appeared in.
Minor works include TV episodes, chapters, songs and game missions.
-- |issue= — optional; The number of the comic book issue the fictional element appeared in.
-- |date= — optional; The date of the publication/release of the minor work where the fictional element appeared in.
--]]
function p.getFormattedAppearance(frame)
local getArgs = require('Module:Arguments').getArgs -- Use Module:Arguments to access module arguments.
local args = getArgs(frame) -- Get the arguments sent via the template.
return _getFormattedAppearance(args) -- Call _getFormattedAppearance() to perform the actual process.
end
return p
801fe2d9de9c3eb00e60fd962b6450e0ab1adc0f
Template:Information
10
58
113
2023-09-04T09:17:39Z
devwiki>UndueMarmot
0
Implement "Additional information" row available in upstream version ([[wikipedia:en:Template:Information]])
wikitext
text/x-wiki
<templatestyles src="Information/style.css" />
<div class="hproduct commons-file-information-table">
<table class="toccolours vevent fileinfotpl-type-information" style="width: 100%;" cellpadding="4">
<!-- Description -->
<tr style="vertical-align: top">
<td id="fileinfotpl_desc" class="fileinfo-paramfield">Description<span class="summary fn" style="display:none">{{PAGENAME}}</span></td>
<td class="description">{{ #if: {{{description|{{{Description|{{{Descripción|{{{descripción|}}}}}}}}}}}} | {{{description|{{{Description|{{{Descripción|{{{descripción|}}}}}}}}}}}} | {{Description missing}} }}</td>
</tr>
<!-- Source -->
<tr style="vertical-align: top">
<td id="fileinfotpl_src" class="fileinfo-paramfield">Source</td>
<td>{{ #if: {{{source|{{{Source|{{{fuente|{{{Fuente|}}}}}}}}}}}} | {{{source|{{{Source|{{{fuente|{{{Fuente|}}}}}}}}}}}} | {{Description missing|source information}} }}</td>
</tr>
<!-- Author -->
<tr style="vertical-align: top">
<td id="fileinfotpl_aut" class="fileinfo-paramfield">Author</td>
<td>{{ #if: {{{author|{{{Author|{{{autor|{{{Autor|}}}}}}}}}}}} | {{{author|{{{Author|{{{autor|{{{Autor|}}}}}}}}}}}} | {{Description missing|author information}} }}</td>
</tr>
<!-- Fecha -->
<tr style="vertical-align: top">
<td id="fileinfotpl_aut" class="fileinfo-paramfield">Date</td>
<td>{{{date|{{{Date|{{{fecha|{{{Fecha|}}}}}}}}}}}}</td>
</tr>
<!-- Other versions -->
{{#switch: {{{other_versions|{{{Other_versions|{{{other versions|{{{Other versions|}}} }}} }}} }}}{{{demo|<noinclude>1</noinclude>}}}
| =
| - =
| none =
| #default =
<tr style="vertical-align: top">
<td id="fileinfotpl_ver" class="fileinfo-paramfield" style="background: #ccf; text-align: right; padding-right: 0.4em; width: 15%; font-weight:bold">Other versions</td>
<td>
{{{other_versions|{{{Other_versions|{{{other versions|{{{Other versions|}}} }}} }}} }}}
</td>
</tr>
}}
<!-- Additional information -->
{{#switch: {{{additional_information|{{{Additional_information|{{{additional information|{{{Additional information|}}} }}} }}} }}}{{{demo|<noinclude>1</noinclude>}}}
| =
| - =
| none =
| #default =
<tr style="vertical-align: top">
<td id="fileinfotpl_add" class="fileinfo-paramfield">Additional information</td>
<td>
{{{additional_information|{{{Additional_information|{{{additional information|{{{Additional information|}}} }}} }}} }}}
</td>
</tr>
}}
</table>
</div><noinclude>{{Documentation}}</noinclude>
1ebff63eb7a51e4949b69d5ddb96348d2305aa92
Template:Information/doc
10
123
239
2023-09-04T09:21:07Z
devwiki>UndueMarmot
0
/* TemplateData */ Add info about newly-added {{{additional_information}}} row + parameter
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
== Purpose ==
This template records and displays metadata for media files, such as photographs and diagrams. It includes a description of the file, its source, and its copyright status.
== Usage ==
<pre>
{{Information
| description =
| source =
| date =
| author =
| other_versions =
| additional_information =
}}
</pre>
== Parameters ==
;description: Describe of the content, (historical) background, and in the case of scientific data, a brief scientific analysis of the media file.
;author: Author(s) of the image. If no individual person is known, use the name of the institution that owns, published or released the file.
;source: Explain where the image is acquired from. Please specify accurately. For instance:
#''Work of the uploader themself:'' Specify "Own work".
#''Acquired from a website:'' Specify the URL of the web page from which it is acquired. Optionally, include a direct link to the image. (Never include a direct link alone.)
#''Scanned from a book or magazine:'' Specify the title, author, publisher, publication year, ISBN and page of the book or title, issue, volume, publication month and year, ISSN (if available) and page of the journal.
;date: Date of creation, or date of publication. Please avoid ambiguous dates like 02/03/04 which can refer to 2 March 2004, 3 February 2004, 4 March 2002 or 3 April 2002, depending on the geographical origin of the person who sees it.
;other versions: '''Optional'''. Links to other versions of this image. The links may be in form of a list of links or thumbnails of the other versions of the image.
;additional information: '''Optional'''. Contains other information about this image that doesn't fit somewhere else. For example, information that might be relevant to determining a file's proper copyright status (e.g. weblinks) might be provided this way.
== Example ==
Example for [[:File:Anders-Celsius-Head.jpg]]:
{{Information
| description = Part of an oil painting of Anders Celsius. Painting by Olof Arenius (1701 - 1766). The original painting is placed in the astronomical observatory of Uppsala University.
| source = Astronomical observatory of Uppsala University
* Source site: http://www.astro.uu.se/history/Celsius_eng.html
* Source URL: http://www.astro.uu.se/history/images/celsius3.jpg
| date = between 1701 - 1766
| author = Olof Arenius
| other_versions = [[:File:Anders-Celsius.jpeg]] (full image)
}}
==TemplateData==
<templatedata>
{
"params": {
"description": {
"required": true,
"label": "Description",
"aliases": [
"Description"
],
"type": "string",
"description": "Describe of the content, (historical) background, and in the case of scientific data, a brief scientific analysis of the media file."
},
"source": {
"required": true,
"label": "Source",
"aliases": [
"Source"
],
"type": "string",
"description": "Explain where the image is acquired from. Please specify accurately. (If it is the work of the uploader themself, use \"Own work\". If it was acquired from a website, specify the URL of the web page from which it is acquired. Optionally, include a direct link to the image. (Never include a direct link alone.) If it was scanned from a book or magazine, specify the title, author, publisher, publication year, ISBN and page of the book or title, issue, volume, publication month and year, ISSN (if available) and page of the journal."
},
"date": {
"required": false,
"label": "Date",
"aliases": [
"Date"
],
"type": "string",
"description": "Date of creation or date of publication. Please avoid ambiguous dates like 02/03/04 which can refer to 2 March 2004, 3 February 2004, 4 March 2002 or 3 April 2002, depending on the geographical origin of the person who sees it."
},
"author": {
"required": true,
"label": "Author",
"aliases": [
"Author"
],
"type": "string",
"description": "Author(s) of the image. If no individual person is known, use the name of the institution that owns, published or released the file."
},
"other_versions": {
"required": false,
"label": "Other versions",
"aliases": [
"Other_versions",
"other versions"
],
"type": "string",
"description": "Links to other versions of this image. The links may be in form of a list of links or thumbnails of the other versions of the image."
},
"additional_information": {
"required": false,
"label": "Additional information",
"aliases": [
"Additional_information",
"Additional information",
"additional information"
],
"type": "string",
"description": "Contains other information about this image that doesn't fit somewhere else."
}
},
"description": "This template is used to make a standardized table providing information about files, including a description, its copyright status, and its source.",
"format": "block"
}
</templatedata>
<includeonly>
[[Category:Templates]]
</includeonly>
fd59146b872645797c8fea34b8da44adf2623565
Template:Infobox character
10
19
35
2023-09-28T05:08:53Z
devwiki>Pppery
0
Reverted edits by [[Special:Contributions/Ruben061737116|Ruben061737116]] ([[User talk:Ruben061737116|talk]]) to last revision by Pppery
wikitext
text/x-wiki
{{Infobox
| bodystyle = border-spacing: 2px 5px;
| above = {{If empty |{{{name|}}} |<includeonly>{{PAGENAMEBASE}}</includeonly> }}
| abovestyle = background: {{If empty |{{{color|}}} |{{{colour|}}} |#DEDEE2 }}; {{#if: {{{color|}}}{{{colour|}}} | color: {{Greater color contrast ratio|{{If empty |{{{color|}}} |{{{colour|}}} }}|black|white }}; }}
| subheader = {{#if: {{{series|}}}{{{franchise|}}} | {{#if: {{{series|}}} | ''{{{series|}}}'' | {{{franchise|}}} }} character{{#if: {{{multiple|}}} | s }} }}
| image = {{{image|}}}|
| caption = {{{caption|}}}
| headerstyle = background: {{If empty |{{{color|}}} |{{{colour|}}} |#DEDEE2 }}; {{#if: {{{color|}}}{{{colour|}}} |color: {{Greater color contrast ratio|{{If empty |{{{color|}}} |{{{colour|}}} }}|black|white }}; }}
| label1 = First appearance
| data1 = {{#if: {{{first|}}} | {{{first|}}} | {{#invoke:Formatted appearance|getFormattedAppearance|major_work={{{first_major|}}} |minor_work={{{first_minor|}}} |issue={{{first_issue|}}} |date={{{first_date|}}} }} }}
| label2 = First game
| data2 = {{{firstgame|}}}
| label3 = Last appearance
| data3 = {{#if: {{{last|}}} | {{{last|}}} | {{#invoke:Formatted appearance|getFormattedAppearance|major_work={{{last_major|}}} |minor_work={{{last_minor|}}} |issue={{{last_issue|}}} |date={{{last_date|}}} }} }}
| label4 = Created by
| data4 = {{{creator|}}}
| label5 = Based on
| data5 = {{{based_on|}}}
| label6 = Adapted by
| data6 = {{{adapted_by|}}}
| label7 = Designed by
| data7 = {{{designer|}}}
| label8 = Portrayed by
| data8 = {{{portrayer|}}}
| label9 = Voiced by
| data9 = {{{voice|}}}
| label10 = Motion capture
| data10 = {{{motion_actor|}}}
| label11 = {{{lbl1|}}}
| data11 = {{{data1|}}}
| label12 = {{{lbl2|}}}
| data12 = {{{data2|}}}
| label13 = {{{lbl3|}}}
| data13 = {{{data3|}}}
| label14 = {{{lbl4|}}}
| data14 = {{{data4|}}}
| label15 = {{{lbl5|}}}
| data15 = {{{data5|}}}
| header20 = {{#if: {{{noinfo|}}} || {{#if: {{{full_name|}}} {{{alias|}}} {{{aliases|}}} {{{nickname|}}} {{{nicknames|}}} {{{race|}}} {{{species|}}} {{{gender|}}} {{{title|}}} {{{occupation|}}} {{{position|}}} {{{class|}}} {{{affiliation|}}} {{{alignment|}}} {{{fighting_style|}}} {{{weapon|}}} {{{family|}}} {{{spouse|}}} {{{spouses|}}} {{{significant_other|}}} {{{significant_others|}}} {{{children|}}} {{{relatives|}}} {{{religion|}}} {{{origin|}}} {{{home|}}} {{{nationality|}}} {{{data21|}}} {{{data22|}}} {{{data23|}}} {{{data24|}}} {{{data25|}}} | {{If empty |{{{info-hdr|}}} |In-universe information }} }} }}
| label21 = Full name
| data21 = {{{full_name|}}}
| label22 = {{#if: {{{alias|}}} | Alias | Aliases }}
| data22 = {{If empty |{{{alias|}}} |{{{aliases|}}} }}
| label23 = {{#if: {{{nickname|}}} | Nickname | Nicknames }}
| data23 = {{If empty |{{{nickname|}}} |{{{nicknames|}}} }}
| label24 = {{#if: {{{race|}}} | Race | Species }}
| data24 = {{If empty |{{{race|}}} |{{{species|}}} }}
| label25 = Gender
| data25 = {{{gender|}}}
| label26 = Title
| data26 = {{{title|}}}
| label27 = {{#if: {{{occupation|}}} | Occupation | {{#if: {{{position|}}} | Position | Class }} }}
| data27 = {{If empty |{{{occupation|}}} |{{{position|}}} |{{{class|}}} }}
| label28 = {{#if: {{{affiliation|}}} | Affiliation | Alignment }}
| data28 = {{If empty |{{{affiliation|}}} |{{{alignment|}}} }}
| label29 = Fighting style
| data29 = {{{fighting_style|}}}
| label30 = Weapon
| data30 = {{{weapon|}}}
| label31 = Family
| data31 = {{{family|}}}
| label32 = {{#if: {{{spouse|}}} | Spouse | Spouses }}
| data32 = {{If empty |{{{spouse|}}} |{{{spouses|}}} }}
| label33 = {{#if: {{{significant_other|}}} | Significant other | Significant others }}
| data33 = {{If empty |{{{significant_other|}}} |{{{significant_others|}}} }}
| label34 = Children
| data34 = {{{children|}}}
| label35 = Relatives
| data35 = {{{relatives|}}}
| label36 = Religion
| data36 = {{{religion|}}}
| label37 = {{#if: {{{origin|}}} | Origin | Home }}
| data37 = {{If empty |{{{origin|}}} |{{{home|}}} }}
| label38 = Nationality
| data38 = {{{nationality|}}}
| label39 = {{{lbl21|}}}
| data39 = {{{data21|}}}
| label40 = {{{lbl22|}}}
| data40 = {{{data22|}}}
| label41 = {{{lbl23|}}}
| data41 = {{{data23|}}}
| label42 = {{{lbl24|}}}
| data42 = {{{data24|}}}
| label43 = {{{lbl25|}}}
| data43 = {{{data25|}}}
| header50 = {{#if: {{{data31|}}} {{{data32|}}} {{{data33|}}} {{{data34|}}} {{{data35|}}} | {{{extra-hdr|}}} }}
| label51 = {{{lbl31|}}}
| data51 = {{{data31|}}}
| label52 = {{{lbl32|}}}
| data52 = {{{data32|}}}
| label53 = {{{lbl33|}}}
| data53 = {{{data33|}}}
| label54 = {{{lbl34|}}}
| data54 = {{{data34|}}}
| label55 = {{{lbl35|}}}
| data55 = {{{data35|}}}
}}<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
3ce93cfa3dfb9b4b9608b850f3d4e6ac282b3bc9
36
35
2024-02-01T19:24:25Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Infobox
| bodystyle = border-spacing: 2px 5px;
| above = {{If empty |{{{name|}}} |<includeonly>{{PAGENAMEBASE}}</includeonly> }}
| abovestyle = background: {{If empty |{{{color|}}} |{{{colour|}}} |#DEDEE2 }}; {{#if: {{{color|}}}{{{colour|}}} | color: {{Greater color contrast ratio|{{If empty |{{{color|}}} |{{{colour|}}} }}|black|white }}; }}
| subheader = {{#if: {{{series|}}}{{{franchise|}}} | {{#if: {{{series|}}} | ''{{{series|}}}'' | {{{franchise|}}} }} character{{#if: {{{multiple|}}} | s }} }}
| image = {{{image|}}}|
| caption = {{{caption|}}}
| headerstyle = background: {{If empty |{{{color|}}} |{{{colour|}}} |#DEDEE2 }}; {{#if: {{{color|}}}{{{colour|}}} |color: {{Greater color contrast ratio|{{If empty |{{{color|}}} |{{{colour|}}} }}|black|white }}; }}
| label1 = First appearance
| data1 = {{#if: {{{first|}}} | {{{first|}}} | {{#invoke:Formatted appearance|getFormattedAppearance|major_work={{{first_major|}}} |minor_work={{{first_minor|}}} |issue={{{first_issue|}}} |date={{{first_date|}}} }} }}
| label2 = First game
| data2 = {{{firstgame|}}}
| label3 = Last appearance
| data3 = {{#if: {{{last|}}} | {{{last|}}} | {{#invoke:Formatted appearance|getFormattedAppearance|major_work={{{last_major|}}} |minor_work={{{last_minor|}}} |issue={{{last_issue|}}} |date={{{last_date|}}} }} }}
| label4 = Created by
| data4 = {{{creator|}}}
| label5 = Based on
| data5 = {{{based_on|}}}
| label6 = Adapted by
| data6 = {{{adapted_by|}}}
| label7 = Designed by
| data7 = {{{designer|}}}
| label8 = Portrayed by
| data8 = {{{portrayer|}}}
| label9 = Voiced by
| data9 = {{{voice|}}}
| label10 = Motion capture
| data10 = {{{motion_actor|}}}
| label11 = {{{lbl1|}}}
| data11 = {{{data1|}}}
| label12 = {{{lbl2|}}}
| data12 = {{{data2|}}}
| label13 = {{{lbl3|}}}
| data13 = {{{data3|}}}
| label14 = {{{lbl4|}}}
| data14 = {{{data4|}}}
| label15 = {{{lbl5|}}}
| data15 = {{{data5|}}}
| header20 = {{#if: {{{noinfo|}}} || {{#if: {{{full_name|}}} {{{alias|}}} {{{aliases|}}} {{{nickname|}}} {{{nicknames|}}} {{{race|}}} {{{species|}}} {{{gender|}}} {{{title|}}} {{{occupation|}}} {{{position|}}} {{{class|}}} {{{affiliation|}}} {{{alignment|}}} {{{fighting_style|}}} {{{weapon|}}} {{{family|}}} {{{spouse|}}} {{{spouses|}}} {{{significant_other|}}} {{{significant_others|}}} {{{children|}}} {{{relatives|}}} {{{religion|}}} {{{origin|}}} {{{home|}}} {{{nationality|}}} {{{data21|}}} {{{data22|}}} {{{data23|}}} {{{data24|}}} {{{data25|}}} | {{If empty |{{{info-hdr|}}} |In-universe information }} }} }}
| label21 = Full name
| data21 = {{{full_name|}}}
| label22 = {{#if: {{{alias|}}} | Alias | Aliases }}
| data22 = {{If empty |{{{alias|}}} |{{{aliases|}}} }}
| label23 = {{#if: {{{nickname|}}} | Nickname | Nicknames }}
| data23 = {{If empty |{{{nickname|}}} |{{{nicknames|}}} }}
| label24 = {{#if: {{{race|}}} | Race | Species }}
| data24 = {{If empty |{{{race|}}} |{{{species|}}} }}
| label25 = Gender
| data25 = {{{gender|}}}
| label26 = Title
| data26 = {{{title|}}}
| label27 = {{#if: {{{occupation|}}} | Occupation | {{#if: {{{position|}}} | Position | Class }} }}
| data27 = {{If empty |{{{occupation|}}} |{{{position|}}} |{{{class|}}} }}
| label28 = {{#if: {{{affiliation|}}} | Affiliation | Alignment }}
| data28 = {{If empty |{{{affiliation|}}} |{{{alignment|}}} }}
| label29 = Fighting style
| data29 = {{{fighting_style|}}}
| label30 = Weapon
| data30 = {{{weapon|}}}
| label31 = Family
| data31 = {{{family|}}}
| label32 = {{#if: {{{spouse|}}} | Spouse | Spouses }}
| data32 = {{If empty |{{{spouse|}}} |{{{spouses|}}} }}
| label33 = {{#if: {{{significant_other|}}} | Significant other | Significant others }}
| data33 = {{If empty |{{{significant_other|}}} |{{{significant_others|}}} }}
| label34 = Children
| data34 = {{{children|}}}
| label35 = Relatives
| data35 = {{{relatives|}}}
| label36 = Religion
| data36 = {{{religion|}}}
| label37 = {{#if: {{{origin|}}} | Origin | Home }}
| data37 = {{If empty |{{{origin|}}} |{{{home|}}} }}
| label38 = Nationality
| data38 = {{{nationality|}}}
| label39 = {{{lbl21|}}}
| data39 = {{{data21|}}}
| label40 = {{{lbl22|}}}
| data40 = {{{data22|}}}
| label41 = {{{lbl23|}}}
| data41 = {{{data23|}}}
| label42 = {{{lbl24|}}}
| data42 = {{{data24|}}}
| label43 = {{{lbl25|}}}
| data43 = {{{data25|}}}
| header50 = {{#if: {{{data31|}}} {{{data32|}}} {{{data33|}}} {{{data34|}}} {{{data35|}}} | {{{extra-hdr|}}} }}
| label51 = {{{lbl31|}}}
| data51 = {{{data31|}}}
| label52 = {{{lbl32|}}}
| data52 = {{{data32|}}}
| label53 = {{{lbl33|}}}
| data53 = {{{data33|}}}
| label54 = {{{lbl34|}}}
| data54 = {{{data34|}}}
| label55 = {{{lbl35|}}}
| data55 = {{{data35|}}}
}}<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
3ce93cfa3dfb9b4b9608b850f3d4e6ac282b3bc9
Nightmare Baldi
0
5
5
2023-11-11T03:18:33Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
wikitext
text/x-wiki
{{Character|name=Nightmare Baldi|image=File:Nightmare_Baldi_SlapPAUSE.gif|imagecaption=|species=Nightmare|gender=Male|eyes=Glow|portrayedby=Baldi|appearsin=Gather Mode, Survival Mode, and Story Mode|debut=Baldi's Basics In Special Things}}''Not to be confused with [https://baldis-basics-in-nightmares.fandom.com/wiki/Nightmare_Baldi Nightmare Baldi] from Baldi's Basics in Nightmares.''
'''Nightmare Baldi''' is the nightmare counterpart of [[Baldi]]. He only appears during the night and is one of the easiest nightmares to avoid as he is extremely slow.
== Appearance ==
Nightmare Baldi has a darkish gradient to him, only one arm with fingers that curve in a strange way, and dark blue pants that have a dark gradient at the bottom. He has some sort of stands to help support his mouth, as it seems to separate his head from his neck to form a mouth.
== Mechanics ==
He moves similar to Baldi. His slap speed is quite fast, but his distance is very slow, so it takes him a while to get to you; making him easy to dodge or run from.
== Gallery ==
<gallery>
File:Nightmare Baldi.png|Ditto.
File:Nightmare Baldi Slap.gif|Nightmare Baldi when he moves.
</gallery>
== Audio ==
[[File:NightBal Slap.mp3|left|thumb|Nightmare Baldi when he moves]]
8190952ad89889fb5182fdead8aef85421aa18aa
Baldi
0
2
2
2023-11-11T21:37:41Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
wikitext
text/x-wiki
{{Character|name=Baldi|image=Baldi.png|imagecaption=Baldi standing near the front door of The Schoolhouse, or when he finds you in your house in Story Mode.|species=Human|gender=Male|eyes=Black (Pupils) White (Eyes)|portrayedby=Uberduck.AI|appearsin=Almost every mode|debut=Baldi's Basics In Education and Learning}}
'''Baldi''' is the main character in Baldi's Basics in Special Things; which explains why the game is based entirely on him.
== Appearance ==
He appears as an adult with one brown strand of hair and two brown eyebrows, along with his iconic green shirt and blue pants. He also has red lips.
== Mechanics ==
=== Tutor Mode ===
When he is in tutor mode, he does nothing but stand and greet you upon entering the schoolhouse.
=== '''Chaser Mode''' ===
When he's in chaser mode, he chases you with his ruler. When he catches you, you will die and lose a life, depending on the mode you're in.
== Gallery ==
<gallery>
File:BaldiPhone.gif|An unused image of Baldi when attracted to the megaphone.
File:BaldiAnnoyedTalk.gif|Seen in the Normal Ending of Gather Mode and in the ending of The Bunker
File:BaldiYCTPSTalk.gif|Baldi holding his You can Think Pads in Story mode when getting all the thinkpads for him.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
ca34e92c058b94c13f7e6b9acf0de94be38c4283
28
2
2024-02-01T15:28:07Z
Bonclide
2
wikitext
text/x-wiki
{{Infobox Character|name=Baldi|image=Baldi.png|imagecaption=Baldi standing near the front door of The Schoolhouse, or when he finds you in your house in Story Mode.|species=Human|gender=Male|eyes=Black (Pupils) White (Eyes)|portrayedby=Uberduck.AI|appearsin=Almost every mode|debut=Baldi's Basics In Education and Learning}}
'''Baldi''' is the main character in Baldi's Basics in Special Things; which explains why the game is based entirely on him.
== Appearance ==
He appears as an adult with one brown strand of hair and two brown eyebrows, along with his iconic green shirt and blue pants. He also has red lips.
== Mechanics ==
=== Tutor Mode ===
When he is in tutor mode, he does nothing but stand and greet you upon entering the schoolhouse.
=== '''Chaser Mode''' ===
When he's in chaser mode, he chases you with his ruler. When he catches you, you will die and lose a life, depending on the mode you're in.
== Gallery ==
<gallery>
File:BaldiPhone.gif|An unused image of Baldi when attracted to the megaphone.
File:BaldiAnnoyedTalk.gif|Seen in the Normal Ending of Gather Mode and in the ending of The Bunker
File:BaldiYCTPSTalk.gif|Baldi holding his You can Think Pads in Story mode when getting all the thinkpads for him.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
6b6300705ddecc4a8e105d386793ee7347b6a353
30
28
2024-02-01T15:29:59Z
Bonclide
2
wikitext
text/x-wiki
{{Infobox character|name=Baldi|image=Baldi.png|imagecaption=Baldi standing near the front door of The Schoolhouse, or when he finds you in your house in Story Mode.|species=Human|gender=Male|eyes=Black (Pupils) White (Eyes)|portrayedby=Uberduck.AI|appearsin=Almost every mode|debut=Baldi's Basics In Education and Learning}}
'''Baldi''' is the main character in Baldi's Basics in Special Things; which explains why the game is based entirely on him.
== Appearance ==
He appears as an adult with one brown strand of hair and two brown eyebrows, along with his iconic green shirt and blue pants. He also has red lips.
== Mechanics ==
=== Tutor Mode ===
When he is in tutor mode, he does nothing but stand and greet you upon entering the schoolhouse.
=== '''Chaser Mode''' ===
When he's in chaser mode, he chases you with his ruler. When he catches you, you will die and lose a life, depending on the mode you're in.
== Gallery ==
<gallery>
File:BaldiPhone.gif|An unused image of Baldi when attracted to the megaphone.
File:BaldiAnnoyedTalk.gif|Seen in the Normal Ending of Gather Mode and in the ending of The Bunker
File:BaldiYCTPSTalk.gif|Baldi holding his You can Think Pads in Story mode when getting all the thinkpads for him.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
ca5e155b7d2f9bec704b8f2440b41fd5dad1b0bc
34
30
2024-02-01T15:59:18Z
Bonclide
2
wikitext
text/x-wiki
{{Infobox character|name=Baldi|image=Baldi.png|imagecaption=Baldi standing near the front door of The Schoolhouse, or when he finds you in your house in Story Mode.|species=Human|gender=Male|eyes=Black (Pupils) White (Eyes)|portrayedby=Uberduck.AI|appearsin=Almost every mode|debut=Baldi's Basics In Education and Learning}}
{| class="wikitable"
! colspan="2" | {{{namr|Baldi}}}
|-
! colspan="2" | [[File:{{{img|Baldi.png}}}|200px]]
|-
| colspan="2" style="text-align: center" | <small>{{{imagecaption|Baldi standing near the front door of The Schoolhouse, or when he finds you in your house in Story Mode.}}}</small>
|-
! colspan="2" | {{{desc|Physical Description}}}
|-
! Species
| {{{species|Human}}}
|-
! Gender
| {{{gender|Male}}}
|-
! Appearance
| {{{appearance|Nearly Every Mode}}}
|-
! Debut
| {{{debut|Baldi's Basics In Education and Learning}}}
|}
'''Baldi''' is the main character in Baldi's Basics in Special Things; which explains why the game is based entirely on him.
== Appearance ==
He appears as an adult with one brown strand of hair and two brown eyebrows, along with his iconic green shirt and blue pants. He also has red lips.
== Mechanics ==
=== Tutor Mode ===
When he is in tutor mode, he does nothing but stand and greet you upon entering the schoolhouse.
=== '''Chaser Mode''' ===
When he's in chaser mode, he chases you with his ruler. When he catches you, you will die and lose a life, depending on the mode you're in.
== Gallery ==
<gallery>
File:BaldiPhone.gif|An unused image of Baldi when attracted to the megaphone.
File:BaldiAnnoyedTalk.gif|Seen in the Normal Ending of Gather Mode and in the ending of The Bunker
File:BaldiYCTPSTalk.gif|Baldi holding his You can Think Pads in Story mode when getting all the thinkpads for him.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
2c5a71f994baf621d4e4e20abdda6a1f2d7f1ca3
Coach
0
12
12
2023-11-11T21:39:53Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
Adding categories
wikitext
text/x-wiki
{{Character|name=Coach|image=File:Coach.png|species=Human|gender=Male|aliases=|appearsin=Gather Mode, Survival Mode, and Party Mode|debut=Baldi's Basics In Special Things}}The '''Coach''' fills the role of gym teacher at the schoolhouse. He likes to wander through the hallways; if you go in his direction, you will be sent to the gym. When this happens, he explains that there will be a '''''basketball practice''''' of some kind tonight.
==Appearance==
The Coach appears to be faceless and has blue skin. He wears a cyan T-shirt, jeans, and oversized white sneakers. He holds a clipboard by his side, and he also has a whistle on his neck.
==Mechanics==
Upon contact, the coach and you will be teleported to the gym.
==Audio==
[[File:Coach.ogg|left|thumb|The Coach whenever he sends you to the gym]]
[[File:Coach ClassDismissed.mp3|left|thumb|Unused Voiceline]]
[[Category:Characters]]
[[Category:Day-Time Characters]]
c8ccf2aee1457df22175cf66ed08de3bb659cd2c
Drumster
0
9
9
2023-11-11T21:40:05Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
Adding categories
wikitext
text/x-wiki
{{Character|name=Drumster|image=File:DrumAnimation1.png|species=Unknown|gender=Male|aliases=|appearsin=Gather Mode, Survival Mode, And Party Mode|eyes=Red|debut=Baldi's Basics In Special Things}}'''Drumster''' is a happy student who roams the school halls. He likes to show people his talent for drumming! Hence his name, Drumster is a drummer.
==Appearance==
Drumster is what seems to be a floating head with a drum right in front of him; he also has floating hands that are holding drumsticks.
==Mechanics==
Drumster wanders around the school, then randomly starts chasing you. If he catches you, he will play his drum, and you won't be able to hear anything in the game but his drumming noises. If he does not catch you in the span of 30 seconds while chasing you, he will give up.
==Trivia==
*Drumster is a replacement for '''''[https://baldis-basics-in-education-learning-roblox.fandom.com/wiki/Let%27s_Drum Let's Drum]''''' who used to be in BBIST.
**Let's Drum was replaced due to it being unoriginal; it was taken from another Roblox Baldi game named '''''[https://www.roblox.com/games/1823470443 Baldi's Basics Multiplayer].'''''
==Gallery==
<gallery>
File:Drumster idle.gif|Drumster's Idle Animation
File:Drumster drumming.gif|Drumster Playing The Drum.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
a3d6f95ee705cdf2cc320b255d059c7d545620b9
Smile Assistaint
0
10
10
2023-11-11T21:40:13Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
Adding categories
wikitext
text/x-wiki
{{Character|name=Smile_Assistant|image=File:Smile_WIKI.gif|species=Unknown|gender=Male|aliases=|appearsin=Gather Mode, Survival Mode, and Party Mode|debut=Baldi's Basics In Special Things}}''Not to be confused with [[Smile]].''
'''Smile Assistant''' Holds the position as a faculty monitor at here school, he enters the school faculty only rooms to make sure no students can get in.
==Appearance==
Smile Assistant appears to be a grey-distorted stress ball.
== Mechanics ==
The Smile Assistant will spawn in a certain faculty room within the schoolhouse, depending on the time of day in survival mode, or if you have 3 notebooks in gather mode. He will constantly make a noise around the area. If the player does not enter the room, the smile assistant will be despawned depending on the time of day in Survival Mode, or if you have collected the 4th notebook in gather mode.
However, if the player does enter the school faculty room, the Smile Assistant will start glitching out and disappear. After this, the lighting turns red. Floating desks, and distorted school rule posters appear in the detention room. Multiple clones of ''[[Smile]]'' will spawn in the map and teleport players and characters to the detention room. After 120 seconds, this event will end.
==Trivia==
*Smile Assistant is the replacement for "Clippy" which used to be in BBIST.
**Clippy also used to be a faculty monitor, who was also nicknamed as "President's Assistant"
**Clippy used to wander around the school, and upon contact, would fling you.
**Clippy was a virtual assistant and digital character introduced by Microsoft in the late 1990s. He was replaced due to the fact that he was not an original character.
==Gallery==
<gallery>
File:Smile Calm.png|Ditto.
File:Smile Insane.gif|Smile Assistant Glitching out.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
36a5b68bf90fa3f87c0a5eee6ffc63be54e849e3
Class President
0
7
7
2023-11-11T21:40:31Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
Adding categories
wikitext
text/x-wiki
{{Character|name=Class President|image=File:Class_President.png|species=Unknown|gender=Male|aliases=*Classroom President
*School President
*President|appearsin=Gather Mode and Survival Mode|debut=Baldi's Basics In Special Things}}The '''Class President''' has the rank of president of the schoolhouse. He likes to wander around the hallways. If you break two rules and pass by one of the cameras placed in the entirety of the schoolhouse, he will find you.
== Appearance ==
The class president wears a crown on top of his head and wears a green suit with cyan-ish pants and oversized brown boots. His face seems to be heavily distorted.
== Mechanics ==
=== Wander Mode ===
When he is in Wander Mode, he will do nothing but roam the hallways of the schoolhouse.
=== Chaser Mode ===
Once you break two rules and have gotten two warnings, cameras will spawn throughout the entirety of the schoolhouse. Upon going past one of the cameras, it will cause the class president to go into chaser mode. When he's in chaser mode, he will chase the player down, and when he catches you, you are sent to the Mega Detention for 50 or 180 seconds.
== Trivia ==
* Class President is the replacement for "President of the Thing," which used to be in BBIST.
* While the class president has his own mode, he is not seen anywhere in it.
* The class president is not seen celebrating Baldi's birthday in the cafeteria during Party mode.
== Gallery ==
<gallery>
File:Class President ANGRY.png|Class President when he goes into Chaser Mode
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
de2d385b309bb85218a0ccc8a71a3efbca10f413
Winders
0
8
8
2023-11-11T21:40:39Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
Adding categories
wikitext
text/x-wiki
{{Character|name=Winders|image=File:Winders.png|species=Unknown|gender=Male|aliases=|appearsin=Gather Mode, Survival Mode, And Party Mode}}'''Winders''' is a character that roams the school's hallways. Similar to Gotta Sweep, Winders is responsible for keeping the schoolhouse "clean" because, according to his poster description in the principal's office, ''"Every school needs a blow dryer!"''
== Appearance ==
Winders wears a pink shirt, purple shorts, and white shoes. Winders' head is a purple distorted light bulb. He is seen carrying a blow dryer on his hand,.
== Mechanics ==
Upon contact, touching winders will cause white dust clouds to appear and cause all your items to be taken from you.
== Trivia ==
* Winders is the replacement for the meme character "Trumpet Boy" that used to be in BBIST.
** Trumpet Boy is a meme that gained popularity in 2018. He got replaced due to the fact that he was not an original character.
* During the QNA In the Official BBIST Discord Server, it was confirmed that Winder's Head is a shattered light bulb from Anim8or, with some of the shapes being recolored to black to shape the weirdest face imaginable.
== Gallery ==
<gallery>
File:WindersParty.png|Winders in Party Mode
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
cd0f4a6ec03ae4f436aa08d2473bfc8f456b9d09
Smile
0
13
13
2023-11-11T21:41:11Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
Adding categories
wikitext
text/x-wiki
{{Character|name=Smile|image=File:S_m_i_l_e_1.png|species=Unknown|gender=Male|aliases=|appearsin=Gather Mode and Survival Mode|debut=Baldi's Basics In Special Things}}''Not to be confused with [[Smile Assistaint|Smile Assistant]].''
'''Smile'''<nowiki/>'s page is WORK IN PROGRESS!! AHHHHHHHHH
==Appearance==
Smile appears to be WORK IN PROGRESS!!! AHHHHHHHHHHHHHH
==Mechanics==
Smile will BE IN WORK IN PROGRESS OAAAAAAAAAAAAH
==Trivia==
*Smile is the replacement for "kid"..?? idk cause ITS WORK IN PROGRESS!!
**Smile was a WOOORKK IN PROGREESS!!
==Gallery==
<gallery>
File:S m i l e 1.png
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
75881ae94953de79db57c70c8b82ef273b394d76
Mega Detention
0
15
15
2023-11-11T22:46:57Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
wikitext
text/x-wiki
{{Location|title=Mega Detention|image=file:PlaceholderLOL.jpg}}
Work in progress.
[[Category:Locations]]
b39d6f5ec0e5bfb584991b41a865e7297320dadf
Library
0
14
14
2023-11-11T22:48:11Z
wikia:the-official-baldis-basics-in-special-things>TwistyXR
0
wikitext
text/x-wiki
{{Location|title=Mega Detention|image=file:PlaceholderLOL.jpg}}
Work in progress.
[[Category:Locations]]
b39d6f5ec0e5bfb584991b41a865e7297320dadf
Template:USERNAME
10
61
119
2024-01-28T21:35:08Z
devwiki>Rodejong
0
Rex™ The Codex Wiki
wikitext
text/x-wiki
<span class="insertusername">{{{1|User}}}</span><noinclude>{{Documentation}}</noinclude>
d5a29404a80b77a70c990222f9a091c881103155
Template:Sp/doc
10
129
251
2024-01-29T04:00:17Z
devwiki>Pppery
0
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
== Usage ==
{{tlx|sp}} will insert a single, ordinary space character, using the numeric character reference <code>&#32;</code>. It is a more readable alternative to using that code.
=== Anywhere you need a regular space ===
You can use {{tl|sp}} anywhere you need a regular, breaking space.
=== Inserting a space inside a parser function ===
Sometimes when using [[mw:Help:parser functions|parser functions]], you need to insert a space at the beginning or end of an optional message. {{tl|sp}} can be used for that purpose. In the following examples, look closely at the spacing between words and punctuation to see the subtle differences.
;Example
<nowiki>I like green{{#if:{{{blue|}}}|and blue}}.</nowiki>
The above example works fine if 'blue' does not have a value ('<code>I like green.</code>').
However, if 'blue' is set to true (<code>|blue=true</code>), then the message is incorrectly run together ('<code>I like greenand blue.</code>').
<nowiki>I like green {{#if:{{{blue|}}}|and blue}}.</nowiki>
Adding the space between 'green' and '{{#if' avoids running the '<code>green and</code>' together, but now there will be an extra space if 'blue' is not set ('<code>I like green .</code>').
<nowiki>I like green{{#if:{{{blue|}}}| and blue}}.</nowiki>
Adding the space between the pipe ('|') and the word 'and' doesn't work. Any leading or trailing spaces from a parser function output are stripped, so this produces exactly the same output as the first example when 'blue' is true ('<code>I like greenand blue.</code>').
<nowiki>I like green{{#if:{{{blue|}}}|{{sp}}and blue}}.</nowiki>
This one works! By inserting the {{tl|sp}} in the parser function output, the space is not stripped, and the correct output is given whether blue is set to true ('<code>I like green and blue.</code>') or not set at all ('<code>I like green.</code>').
=== Disabling default substitution ===
Suppose you have a template, {{tl|Example}}, that uses substitution, like this:
<nowiki>{{{{{subst|subst:}}}#if{{{condition|}}}|message}}</nowiki>
When the template is transcluded and saved, the result would be interpreted as:
<nowiki>{{subst:#if{{{condition|}}}|message}}</nowiki>
You could override the substitution by setting the 'subst' attribute to {{tl|sp}}:
<nowiki>{{Example| subst={{sp}} }}</nowiki>
Now the result would be interpreted as:
<nowiki>{{ #if{{{condition|}}}|message}}</nowiki>
The extra blank space preceding the '#if' would not affect the template at all (except to suppress the default substitution).
== TemplateData ==
<templatedata>
{
"params": {},
"description": "Inserts a single space character; mainly used in parser functions",
"format": "inline"
}
</templatedata>
<includeonly>
[[Category:templates]]
</includeonly>
3ab3e278247cef6eeb81bc2fe4abe6883a4315a6
Template:Sp
10
62
121
2024-01-29T04:00:48Z
devwiki>Pppery
0
-
wikitext
text/x-wiki
 <noinclude>{{Documentation}}</noinclude>
2d4b21d0fc5a5155e77130f9a6c22f7eaf0f357f
Template:USERNAME/doc
10
128
249
2024-01-29T19:51:48Z
devwiki>Pppery
0
Fix
wikitext
text/x-wiki
{{Documentation subpage}}
== Usage ==
Dear {{USERNAME}},
If you want to show the user name of the person who is reading the article, like you do now, put the following pre-set in the place where you want the reader to be addressed:
<nowiki>{{USERNAME}}</nowiki>
==What is needed==
The following code needs to be added to [[MediaWiki:Common.js]]
<syntaxhighlight lang="javascript">
// Username script //
(function () {
if (mw.config.get('wgUserName') !== null) $('span.insertusername').text(mw.config.get('wgUserName'));
})();
</syntaxhighlight>
<small><small>Source: [https://thecodex.wiki/MediaWiki:Common.js thecodex.wiki]</small></small>
<includeonly>
<!-- Categories below this line -->
[[Category:Templates|USERNAME]]</includeonly>
90c218f47158f242fa736059aa5e79d66d424f66
Leapy Amphibian
0
3
3
2024-01-30T18:14:47Z
wikia:the-official-baldis-basics-in-special-things>Busybody64
0
/* Trivia */
wikitext
text/x-wiki
{{Character|name=Leapy Amphibian|image=FrogJump.gif|imagecaption=|species=Frog|debut=Baldi's Basics In Special Things|gender=Male|appearsin=Gather Mode, Survival Mode, And Party Mode|aliases=*The School Pet}}
'''Leapy Amphibian''' is a frog that leaps around the halls of the schoolhouse, and when you get in his way, he will trip you over.
== Appearance ==
Leapy is a giant frog with a red mouth, darker green feet, fly-like eyes, and an abnormal appearance.
== Mechanics ==
He moves similarly to Monstrosity or Baldi. He moves when he leaps, and on impact, he will trip you over along with any other character that gets in his way.
== Trivia ==
* Leapy Amphibian is the replacement for the meme character "Dat Boi" that used to be in BBIST.
** Dat Boi is a meme that gained popularity in 2016. He got replaced due to the fact that he was not an original character.
* His model was made in ROBLOX Studio.
* Leapy Amphibian was at one point called "The School Pet"
* Leapy appeared in a Baldi's Basics Plus mod called ''[https://gamebanana.com/wips/77912 Baldi's Basics Times].'' His appearance in that mod is not canon to Baldi's Basics In Special Things.
== Gallery ==
<gallery>
File:Leapy Model 1.png|The model seen when the creator was messing around in Survival Mode!
File:Frog Model 2.png|The model seen in the alternative ending of Gather Mode below the map
File:FrogJumpParty.gif|Ditto in Party Mode.
File:FrogConcept1.png|Concept One (lore and not an official concept) seen in Alt Ending of Story Mode
File:FrogConcept2.png|Concept Two (lore and not an official concept) seen in Alt Ending of Story Mode
</gallery>
== Audio ==
[[File:Leapy Ribbit.ogg|left|thumb|Leapy Amphibian when he moves.]]
[[Category:Day-Time Characters]]
3c3e482b19e4a3b1904bc8a38cfcf2eb5b5ade34
Monstrosity
0
11
11
2024-01-31T20:03:23Z
wikia:the-official-baldis-basics-in-special-things>FlaminIsCoolLmao
0
his name isnt monster baldi man
wikitext
text/x-wiki
=== '''''WIP!''''' ===
'''Monstrosity''' is a character that activates during the night and chases you. He replaces Monster Baldi that used to be in the game. Monster Baldi was removed because it came from different baldi games.
{{Character|name=Monstrosity|image=Monster Baldi.png|occupation=Monster|species=Nightmare Varient Of Baldi|gender=Male|debut=Terminex|portrayedby=Giant Enemy Spider}}
== Apperance ==
He appears as a character that has a black head, red hair, a pink shirt, green pants and brown shoes. (Is that his actual sprite it doesnt look like the sprite i know)
== Mechanics ==
He's covered in stone in the day, Mid-free at evening then Free/Normal in Night, He moves just like Baldi. He does not move, or kill you in the Mid-free stage.
[[Category:Characters]]
7334eb3f9cc81c96617b6c37174f1aefe09a824c
Main Page
0
1
1
2024-02-01T14:31:59Z
MediaWiki default
1
Welcome to Miraheze!
wikitext
text/x-wiki
__NOTOC__
== Welcome to {{SITENAME}}! ==
This Main Page was created automatically and it seems it hasn't been replaced yet.
=== For the bureaucrat(s) of this wiki ===
Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting.
You can immediately start working on your wiki or whenever you want.
Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links:
* [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users)
* [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]]
* [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.)
==== I still don't understand X! ====
Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here:
* [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]]
* On [[phab:|Phabricator]]
* On [https://miraheze.org/discord Discord]
* On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat])
=== For visitors of this wiki ===
Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later!
21236ac3f8d65e5563b6da6b70815ca6bf1e6616
16
1
2024-02-01T14:59:47Z
Bonclide
2
Protected "[[Main Page]]" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
wikitext
text/x-wiki
__NOTOC__
== Welcome to {{SITENAME}}! ==
This Main Page was created automatically and it seems it hasn't been replaced yet.
=== For the bureaucrat(s) of this wiki ===
Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting.
You can immediately start working on your wiki or whenever you want.
Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links:
* [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users)
* [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]]
* [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.)
==== I still don't understand X! ====
Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here:
* [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]]
* On [[phab:|Phabricator]]
* On [https://miraheze.org/discord Discord]
* On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat])
=== For visitors of this wiki ===
Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later!
21236ac3f8d65e5563b6da6b70815ca6bf1e6616
17
16
2024-02-01T15:00:26Z
Bonclide
2
wikitext
text/x-wiki
{{DISPLAYTITLE:The Official BBIST Wiki Home Page}}
<mainpage-leftcolumn-start />
<div style="text-align: center; font-size: x-large; padding: 1em;">
== '''Welcome to the {{SITENAME}}!''' ==
</div><big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc. We're a collaborative community website about {{topic}} Wiki that anyone, including you, can build and expand. Wikis like this one depend on readers getting involved and adding content. Click the "ADD NEW PAGE" or "EDIT" button at the top of any page to get started!''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery position="center" captionalign="center" navigation="true">
File:Characters wiki icon3.png|link=Category:Characters|Characters
File:PlaceholderLOL.jpg|link=Category:Locations|Locations
</gallery>
<!-- The gallery above works well for individual articles, but it would also be good to have another below it that points to important Category: pages. --><mainpage-rightcolumn-start />
aeee16432acadb72f908f33a6da85b35440005a2
18
17
2024-02-01T15:00:43Z
Bonclide
2
wikitext
text/x-wiki
<div style="text-align: center; font-size: x-large; padding: 1em;">
== '''Welcome to the {{SITENAME}}!''' ==
</div><big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc. We're a collaborative community website about {{topic}} Wiki that anyone, including you, can build and expand. Wikis like this one depend on readers getting involved and adding content. Click the "ADD NEW PAGE" or "EDIT" button at the top of any page to get started!''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery position="center" captionalign="center" navigation="true">
File:Characters wiki icon3.png|link=Category:Characters|Characters
File:PlaceholderLOL.jpg|link=Category:Locations|Locations
</gallery>
<!-- The gallery above works well for individual articles, but it would also be good to have another below it that points to important Category: pages. --><mainpage-rightcolumn-start />
f81592431bd5c04d1e5316d39b46157fdc06a516
19
18
2024-02-01T15:02:54Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery position="center" captionalign="center" navigation="true">
File:Characters wiki icon3.png|link=Category:Characters|Characters
File:PlaceholderLOL.jpg|link=Category:Locations|Locations
</gallery>
<!-- The gallery above works well for individual articles, but it would also be good to have another below it that points to important Category: pages. --><mainpage-rightcolumn-start />
f900f0141c3004a799da941e7e9297b1e342d675
20
19
2024-02-01T15:03:30Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery position="center" captionalign="center" navigation="true">
File:Characters wiki icon3.png|link=Category:Characters|Characters
File:PlaceholderLOL.jpg|link=Category:Locations|Locations
</gallery>
<!-- The gallery above works well for individual articles, but it would also be good to have another below it that points to important Category: pages. -->
2bac816821b4a81762a0c672d52b65748c011584
21
20
2024-02-01T15:09:29Z
Bonclide
2
/* Important articles */
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery position="center" captionalign="center" navigation="true">
File:Characters wiki icon3.png|[[:Category:Characters|Characters]]
File:PlaceholderLOL.jpg|[[:Category:Locations|Locations]]
</gallery>
<!-- The gallery above works well for individual articles, but it would also be good to have another below it that points to important Category: pages. -->
05380246e6fa7b7f0890c96b335e4d986f0464e6
23
21
2024-02-01T15:11:35Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
f64e63199fc65c89ac20f696af4f334a8c2be086
24
23
2024-02-01T15:12:06Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery>
File:Characters wiki icon3.webp|Characters
</gallery>
f0abc493f978c4f79f10551f7a20d31296388930
25
24
2024-02-01T15:13:18Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery>
File:Characters wiki icon3.webp|[[:Category:Characters|Characters]]
File:Characters wiki icon3.webp|[[:Category:Locations|Locations]]
</gallery>
7ba0439902d88bcaea38ca67a77e051e4129c62e
26
25
2024-02-01T15:20:20Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery>
File:Characters wiki icon3.webp|Characters
File:Characters wiki icon3.webp|Locations
</gallery>
225c3d115535176665ab38443d33442a60ebda3e
27
26
2024-02-01T15:22:24Z
Bonclide
2
wikitext
text/x-wiki
== '''Welcome to the {{SITENAME}}!''' ==
<big>''Hello everyone! Welcome to the official Baldi's Basics In Special Things Wiki! Here you can find information based off of Baldi's Basics in Special Things when it comes to events, characters, badges, etc.''</big>
''<big>Baldi's Basics In Special things is like the original Baldi's Basics, but 10x more massive and expansive! There's over 10+ game modes and tons of new characters, secrets, etc. Along with its own lore!</big> <small>(The game is work in progress, but classic mode has a lot to offer!)</small>''
== <big>Links</big> ==
* '''''<big>Play [https://www.roblox.com/games/2585060673 Baldi's Basics In Special Things] Here!</big>'''''
* <big>'''''Join the [https://discord.gg/xsgujUKZRa Official BBIST Discord Server] here!'''''</big> '''''<small>(only if your above 13 yrs old)</small>'''''
==<big>Important articles</big>==
<gallery>
File:Characters wiki icon3.webp|link=Category:Characters|Characters
File:Characters wiki icon3.webp|link=Category:Locations|Locations
</gallery>
03278ec91209b8dbf009fd9dfde98fbd4dbaf32d
File:Characters wiki icon3.webp
6
16
22
2024-02-01T15:11:06Z
Bonclide
2
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Template:Documentation
10
20
38
37
2024-02-01T19:24:25Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude>
9885bb4fa99bf3d5b960e73606bbb8eed3026877
Template:Documentation subpage
10
21
40
39
2024-02-01T19:24:26Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
471e685c1c643a5c6272e20e49824fffebad0448
Module:Arguments
828
22
42
41
2024-02-01T19:24:26Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Module:Documentation
828
23
44
43
2024-02-01T19:24:27Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
78cc3a78f2b5dbb267fa16027c0800a22dbd3c42
Module:Documentation/config
828
24
46
45
2024-02-01T19:24:27Z
Bonclide
2
1 revision imported
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
d70e8b1402a2bbe08a1fef4b75d743e661af0c95
Module:Documentation/styles.css
828
25
48
47
2024-02-01T19:24:28Z
Bonclide
2
1 revision imported
text
text/plain
.documentation,
.documentation-metadata {
border: 1px solid #a2a9b1;
background-color: #ecfcf4;
clear: both;
}
.documentation {
margin: 1em 0 0 0;
padding: 1em;
}
.documentation-metadata {
margin: 0.2em 0; /* same margin left-right as .documentation */
font-style: italic;
padding: 0.4em 1em; /* same padding left-right as .documentation */
}
.documentation-startbox {
padding-bottom: 3px;
border-bottom: 1px solid #aaa;
margin-bottom: 1ex;
}
.documentation-heading {
font-weight: bold;
font-size: 125%;
}
.documentation-clear { /* Don't want things to stick out where they shouldn't. */
clear: both;
}
.documentation-toolbar {
font-style: normal;
font-size: 85%;
}
/* [[Category:Template stylesheets]] */
5fb984fe8632dc068db16853a824c9f3d5175dd9
Template:Infobox
10
26
50
49
2024-02-01T19:24:28Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<noinclude>
{{documentation}}
</noinclude>
627ee6fcf4d4f108fe054b5c476201cad0ed7717
Module:Infobox
828
27
52
51
2024-02-01T19:24:29Z
Bonclide
2
1 revision imported
Scribunto
text/plain
--
-- This module implements {{Infobox}}
--
local p = {}
local args = {}
local origArgs = {}
local root
local function notempty( s ) return s and s:match( '%S' ) end
local function fixChildBoxes(sval, tt)
if notempty(sval) then
local marker = '<span class=special_infobox_marker>'
local s = sval
s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker)
if s:match(marker) then
s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1')
s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
end
if s:match(marker) then
local subcells = mw.text.split(s, marker)
s = ''
for k = 1, #subcells do
if k == 1 then
s = s .. subcells[k] .. '</' .. tt .. '></tr>'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
return sval
end
end
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
local vals = {}
for k, v in pairs(t1) do
vals[v] = true
end
for k, v in pairs(t2) do
vals[v] = true
end
local ret = {}
for k, v in pairs(vals) do
table.insert(ret, k)
end
return ret
end
local function getArgNums(prefix)
-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'data', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local nums = {}
for k, v in pairs(args) do
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
if num then table.insert(nums, tonumber(num)) end
end
table.sort(nums)
return nums
end
local function addRow(rowArgs)
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:attr('id', rowArgs.rowid)
:tag('th')
:attr('colspan', 2)
:attr('id', rowArgs.headerid)
:addClass(rowArgs.class)
:addClass(args.headerclass)
:css('text-align', 'center')
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
elseif rowArgs.data then
if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
rowArgs.rowstyle = 'display:none'
end
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
row:attr('id', rowArgs.rowid)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:attr('id', rowArgs.labelid)
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
if not rowArgs.label then
dataCell
:attr('colspan', 2)
:css('text-align', 'center')
end
dataCell
:attr('id', rowArgs.dataid)
:addClass(rowArgs.class)
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
end
local function renderTitle()
if not args.title then return end
root
:tag('caption')
:addClass(args.titleclass)
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
root
:tag('tr')
:tag('th')
:attr('colspan', 2)
:addClass(args.aboveclass)
:css('text-align', 'center')
:css('font-size', '125%')
:css('font-weight', 'bold')
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass(args.belowclass)
:css('text-align', 'center')
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderSubheaders()
if args.subheader then
args.subheader1 = args.subheader
end
if args.subheaderrowclass then
args.subheaderrowclass1 = args.subheaderrowclass
end
local subheadernums = getArgNums('subheader')
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function renderImages()
if args.image then
args.image1 = args.image
end
if args.caption then
args.caption1 = args.caption
end
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = mw.html.create():wikitext(args['image' .. tostring(num)])
if caption then
data
:tag('div')
:cssText(args.captionstyle)
:wikitext(caption)
end
addRow({
data = tostring(data),
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
local function preprocessRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
local lastheader
for k, num in ipairs(rownums) do
if args['header' .. tostring(num)] then
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
lastheader = num
elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
local function renderRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)],
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)],
dataid = args['dataid' .. tostring(num)],
labelid = args['labelid' .. tostring(num)],
headerid = args['headerid' .. tostring(num)],
rowid = args['rowid' .. tostring(num)]
})
end
end
local function renderItalicTitle()
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
local function _infobox()
-- Specify the overall layout of the infobox, with special settings
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass((args.subbox ~= 'yes') and 'infobox' or nil)
:addClass(args.bodyclass)
if args.subbox == 'yes' then
root
:css('padding', '0')
:css('border', 'none')
:css('margin', '-3px')
:css('width', 'auto')
:css('min-width', '100%')
:css('font-size', '100%')
:css('clear', 'none')
:css('float', 'none')
:css('background-color', 'transparent')
else
root
:css('width', '22em')
end
root
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
renderSubheaders()
renderImages()
if args.autoheaders then
preprocessRows()
end
renderRows()
renderBelowRow()
renderItalicTitle()
return tostring(root)
end
local function preprocessSingleArg(argName)
-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
local function preprocessArgs(prefixTable, step)
-- Assign the parameters with the given prefixes to the args table, in order, in batches
-- of the step size specified. This is to prevent references etc. from appearing in the
-- wrong order. The prefixTable should be an array containing tables, each of which has
-- two possible fields, a "prefix" string and a "depend" table. The function always parses
-- parameters containing the "prefix" string, but only parses parameters in the "depend"
-- table if the prefix parameter is present and non-blank.
if type(prefixTable) ~= 'table' then
error("Non-table value detected for the prefix table", 2)
end
if type(step) ~= 'number' then
error("Invalid step value detected", 2)
end
-- Get arguments without a number suffix, and check for bad input.
for i,v in ipairs(prefixTable) do
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
error('Invalid input detected to preprocessArgs prefix table', 2)
end
preprocessSingleArg(v.prefix)
-- Only parse the depend parameter if the prefix parameter is present and not blank.
if args[v.prefix] and v.depend then
for j, dependValue in ipairs(v.depend) do
if type(dependValue) ~= 'string' then
error('Invalid "depend" parameter value detected in preprocessArgs')
end
preprocessSingleArg(dependValue)
end
end
end
-- Get arguments with number suffixes.
local a = 1 -- Counter variable.
local moreArgumentsExist = true
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a + step - 1 do
for j,v in ipairs(prefixTable) do
local prefixArgName = v.prefix .. tostring(i)
if origArgs[prefixArgName] then
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
preprocessSingleArg(prefixArgName)
end
-- Process the depend table if the prefix argument is present and not blank, or
-- we are processing "prefix1" and "prefix" is present and not blank, and
-- if the depend table is present.
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
for j,dependValue in ipairs(v.depend) do
local dependArgName = dependValue .. tostring(i)
preprocessSingleArg(dependArgName)
end
end
end
end
a = a + step
end
end
local function parseDataParameters()
-- Parse the data parameters in the same order that the old {{infobox}} did, so that
-- references etc. will display in the expected places. Parameters that depend on
-- another parameter are only processed if that parameter is present, to avoid
-- phantom references appearing in article reference lists.
preprocessSingleArg('autoheaders')
preprocessSingleArg('child')
preprocessSingleArg('bodyclass')
preprocessSingleArg('subbox')
preprocessSingleArg('bodystyle')
preprocessSingleArg('title')
preprocessSingleArg('titleclass')
preprocessSingleArg('titlestyle')
preprocessSingleArg('above')
preprocessSingleArg('aboveclass')
preprocessSingleArg('abovestyle')
preprocessArgs({
{prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
}, 10)
preprocessSingleArg('subheaderstyle')
preprocessSingleArg('subheaderclass')
preprocessArgs({
{prefix = 'image', depend = {'caption', 'imagerowclass'}}
}, 10)
preprocessSingleArg('captionstyle')
preprocessSingleArg('imagestyle')
preprocessSingleArg('imageclass')
preprocessArgs({
{prefix = 'header'},
{prefix = 'data', depend = {'label'}},
{prefix = 'rowclass'},
{prefix = 'rowstyle'},
{prefix = 'rowcellstyle'},
{prefix = 'class'},
{prefix = 'dataid'},
{prefix = 'labelid'},
{prefix = 'headerid'},
{prefix = 'rowid'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
preprocessSingleArg('decat')
end
function p.infobox(frame)
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
function p.infoboxTemplate(frame)
-- For calling via #invoke within a template
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p
c6ac51f9e2faf9c2f3aba1fb8c05af98db47f4d4
Template:Para
10
28
54
53
2024-02-01T19:24:29Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">|{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}=}}{{{2|}}}</code><noinclude>
{{Documentation}}
<!--Categories and interwikis go near the bottom of the /doc subpage.-->
</noinclude>
7be5bee75307eae9342bbb9ff3a613e93e93d5a7
Template:If empty
10
29
56
55
2024-02-01T19:24:30Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<includeonly>{{{{{|safesubst:}}}#if:{{{1|}}}
| {{{1}}}
| {{{{{|safesubst:}}}#if:{{{2|}}}
| {{{2}}}
| {{{{{|safesubst:}}}#if:{{{3|}}}
| {{{3}}}
| {{{{{|safesubst:}}}#if:{{{4|}}}
| {{{4}}}
| {{{{{|safesubst:}}}#if:{{{5|}}}
| {{{5}}}
| {{{{{|safesubst:}}}#if:{{{6|}}}
| {{{6}}}
| {{{{{|safesubst:}}}#if:{{{7|}}}
| {{{7}}}
| {{{{{|safesubst:}}}#if:{{{8|}}}
| {{{8}}}
| {{{{{|safesubst:}}}#if:{{{9|}}}
| {{{9}}}
}}
}}
}}
}}
}}
}}
}}
}}
}}</includeonly><noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
eeda2c13231e9a8b44d480e8c429d73652575009
Category:Voting templates
14
32
62
61
2024-02-01T19:42:54Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
Templates for casting votes.
[[Category:Templates]]
c1604198c4a29ffc2fd111116408c341df73f30b
Category:Notice templates
14
33
64
63
2024-02-01T19:42:55Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Category:Resolution templates
14
34
66
65
2024-02-01T19:42:55Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Category:Social media userboxes
14
35
68
67
2024-02-01T19:42:56Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Category:License templates
14
36
70
69
2024-02-01T19:42:56Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Template:=
10
37
72
71
2024-02-01T19:42:57Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
=<noinclude>
{{documentation}}
</noinclude>
44f3105df6073eb65369938814d1551b51611402
Template:Clear
10
38
74
73
2024-02-01T19:42:57Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<div style="clear:{{{1|both}}};"></div><noinclude>
{{documentation}}
</noinclude>
38bab3e3d7fbd3d6800d46556e60bc6bac494d72
Template:Current time
10
39
76
75
2024-02-01T19:42:58Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{#switch:{{{1}}}
|Coordinated Universal Time=Current UTC is {{CURRENTTIME}}
|UTC-1=Current time for {{{1}}} is {{utc|23}}
|UTC-2=Current time for {{{1}}} is {{utc|22}}
|UTC-2:30=Current time for {{{1}}} is {{utc|21|30}}
|UTC-3=Current time for {{{1}}} is {{utc|21}}
|UTC-3:30=Current time for {{{1}}} is {{utc|20|30}}
|UTC-4=Current time for {{{1}}} is {{utc|20}}
|UTC-5=Current time for {{{1}}} is {{utc|19}}
|UTC-6=Current time for {{{1}}} is {{utc|18}}
|UTC-7=Current time for {{{1}}} is {{utc|17}}
|UTC-8=Current time for {{{1}}} is {{utc|16}}
|UTC-9=Current time for {{{1}}} is {{utc|15}}
|UTC-9:30=Current time for {{{1}}} is {{utc|14|30}}
|UTC-10=Current time for {{{1}}} is {{utc|14}}
|UTC-11=Current time for {{{1}}} is {{utc|13}}
|UTC-12=Current time for {{{1}}} is {{utc|12}}
|UTC+0:20=Current time for {{{1}}} is {{utc|0|20}}
|UTC+0:30=Current time for {{{1}}} is {{utc|0|30}}
|UTC+1=Current time for {{{1}}} is {{utc|1}}
|UTC+2=Current time for {{{1}}} is {{utc|2}}
|UTC+3=Current time for {{{1}}} is {{utc|3}}
|UTC+3:30=Current time for {{{1}}} is {{utc|3|30}}
|UTC+4=Current time for {{{1}}} is {{utc|4}}
|UTC+4:30=Current time for {{{1}}} is {{utc|4|30}}
|UTC+4:51=Current time for {{{1}}} is {{utc|4|51}}
|UTC+5=Current time for {{{1}}} is {{utc|5}}
|UTC+5:30=Current time for {{{1}}} is {{utc|5|30}}
|UTC+5:40=Current time for {{{1}}} is {{utc|5|40}}
|UTC+5:45=Current time for {{{1}}} is {{utc|5|45}}
|UTC+6=Current time for {{{1}}} is {{utc|6}}
|UTC+6:30=Current time for {{{1}}} is {{utc|6|30}}
|UTC+7=Current time for {{{1}}} is {{utc|7}}
|UTC+7:20=Current time for {{{1}}} is {{utc|7|20}}
|UTC+7:30=Current time for {{{1}}} is {{utc|7|30}}
|UTC+8=Current time for {{{1}}} is {{utc|8}}
|UTC+8:30=Current time for {{{1}}} is {{utc|8|30}}
|UTC+8:45=Current time for {{{1}}} is {{utc|8|45}}
|UTC+9=Current time for {{{1}}} is {{utc|9}}
|UTC+9:30=Current time for {{{1}}} is {{utc|9|30}}
|UTC+10=Current time for {{{1}}} is {{utc|10}}
|UTC+10:30=Current time for {{{1}}} is {{utc|10|30}}
|UTC+11=Current time for {{{1}}} is {{utc|11}}
|UTC+11:30=Current time for {{{1}}} is {{utc|11|30}}
|UTC+12=Current time for {{{1}}} is {{utc|12}}
|UTC+12:45=Current time for {{{1}}} is {{utc|12|45}}
|UTC+13=Current time for {{{1}}} is {{utc|13}}
|UTC+13:45=Current time for {{{1}}} is {{utc|13|45}}
|UTC+14=Current time for {{{1}}} is {{utc|14}}
|#default=Current time is {{CURRENTTIME}}
}}<noinclude>{{documentation|content=Returns the current time in a given timezone (defaulting to the timezone specified in [[Special:ManageWiki/settings#mw-section-localisation]], which in turn defaults to UTC)
== Examples ==
{{tlx|current time}} -> {{current time}}
{{tlx|current time|UTC+1}} -> {{current time|UTC+1}}
{{tlx|current time|UTC-5}} -> {{current time|UTC-5}}
[[Category:Templates]]
}}</noinclude>
84d7f12dbea154240f9fa86372863cd6152dd98b
Template:Discussion bottom
10
40
78
77
2024-02-01T19:42:58Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<noinclude><div></noinclude>----
:The above discussion is preserved as an archive. Please do not modify it. Subsequent comments should be made in a new section </div><noinclude>{{documentation|Template:Discussion top/doc}}</noinclude>
80d5baa979985b3b685585611b0e954d2c1c6e10
Template:Discussion top
10
41
80
79
2024-02-01T19:42:58Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<div class="boilerplate metadata discussion-archived" style="background-color: #F2F4FC; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px solid #aaa">
:The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section.
::{{{1|}}}
----<noinclude></div>{{documentation}}</noinclude>
c8b38525e188dbfa68b0e9cdd1864ceff2ed100e
Template:Hatnote
10
42
82
81
2024-02-01T19:42:59Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<div style="margin-left:2em; margin-right: 2em;>''{{{1}}}''</div>
<!-- The wikipedia templates uses :, which generated dd and dt tags. That is not ideal for accessibility. --><noinclude>
This is a general purpose template for all kind of [https://en.wikipedia.org/wiki/Wikipedia:Hatnote hatnotes]. '''Hatnotes''' are a small annotation above a page or a section that can help the reader navigate. It's used for example to clarify what a section is about and link to other pages the reader may want to read.
== Example usage ==
<pre><nowiki>
=== Heading ===
{{hatnote|This section is about headings in text, for the human body part see [[Head|Head]]. <br> For the the first level heading see the main article [[Headline]].</br> H1 redirects here, for the car see [[Hyundai#H1|Hyundai H1]].}}
The first sentence of the section is here.
</nowiki></pre>
=== Heading ===
{{hatnote|This section is about headings in text, for the human body part see [[Head|Head]]. <br> For the the first level heading see the main article [[Headline]].</br> H1 redirects here, for the car see [[Hyundai#H1|Hyundai H1]].}}
The first sentence of the section is here.
<templatedata>
{
"params": {
"1": {
"label": "content",
"description": "the content of the note",
"example": "For the xxx see [[yyy]]."
}
},
"description": "Adds a annotation for the reader about the content that follows. Usually used after a heading."
}
</templatedata>
[[Category:Templates]]
</noinclude>
5e58f83d6fa53ed06f85139184aff1d651804efe
Template:Ping
10
43
84
83
2024-02-01T19:42:59Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{{{{|safesubst:}}}#invoke:Reply to|replyto|<noinclude>example=Example</noinclude>|max=50}}<noinclude>{{documentation}}</noinclude>
0a7b3547181e17a03ec99855e276688fcc36ce1e
Template:Talk quote inline
10
44
86
85
2024-02-01T19:43:00Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<templatestyles src="Talk quote inline/styles.css" /><!--
--><q {{#if: {{{title|}}} | title="{{{title}}}"}} class="inline-quote-talk {{#if: {{{i|{{{italic|}}}}}} | inline-quote-talk-italic}} {{#if: {{{q|{{{quotes|}}}}}}|inline-quote-talk-marks}}">{{{1|Example text}}}</q><!--
--><noinclude>
{{Documentation}}
</noinclude>
b18e2fdc57277adbf4e3f4f513e78ecc5831453f
Template:Template link
10
45
88
87
2024-02-01T19:43:00Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
eabbec62efe3044a98ebb3ce9e7d4d43c222351d
Template:Template link expanded
10
46
90
89
2024-02-01T19:43:01Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<code><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!--
-->[[{{{sister|{{{SISTER|}}}}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
-->{{#if:{{{2|}}} ||{{{2}}}}}<!--
-->{{#if:{{{3|}}} ||{{{3}}}}}<!--
-->{{#if:{{{4|}}} ||{{{4}}}}}<!--
-->{{#if:{{{5|}}} ||{{{5}}}}}<!--
-->{{#if:{{{6|}}} ||{{{6}}}}}<!--
-->{{#if:{{{7|}}} ||{{{7}}}}}<!--
-->{{#if:{{{8|}}} ||{{{8}}}}}<!--
-->{{#if:{{{9|}}} ||{{{9}}}}}<!--
-->{{#if:{{{10|}}} ||{{{10}}}}}<!--
-->{{#if:{{{11|}}} ||{{{11}}}}}<!--
-->{{#if:{{{12|}}} ||{{{12}}}}}<!--
-->{{#if:{{{13|}}} ||{{{13}}}}}<!--
-->{{#if:{{{14|}}} ||{{{14}}}}}<!--
-->{{#if:{{{15|}}} ||{{{15}}}}}<!--
-->{{#if:{{{16|}}} ||{{{16}}}}}<!--
-->{{#if:{{{17|}}} ||{{{17}}}}}<!--
-->{{#if:{{{18|}}} ||{{{18}}}}}<!--
-->{{#if:{{{19|}}} ||{{{19}}}}}<!--
-->{{#if:{{{20|}}} ||{{{20}}}}}<!--
-->{{#if:{{{21|}}} ||''...''}}<!--
--><nowiki>}}</nowiki></code><noinclude>
{{Documentation}}
</noinclude>
9f670205d4b358df089b1a820f78f02a88afca3a
Template:Template list
10
47
92
91
2024-02-01T19:43:01Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
== Resolution templates ==
{{hatnote|Category: [[:Category:Resolution templates|Resolution templates]]}}
<section begin=resolution-templates/>
* {{tl|done}} - {{done}}
* {{tl|partly done}} - {{partly done}}
* {{tl|resolved}} - {{resolved}}
* {{tl|not done}} - {{not done}}
* {{tl|doing}} - {{doing}}
* {{tl|comment}} - {{comment}}
* {{tl|on hold}} - {{on hold}}
* {{tl|agree}} - {{agree}}
* {{tl|withdrawn}} - {{withdrawn}}
* {{tl|working}} - {{working}}
* {{tl|idea}} - {{idea}}
* {{tl|reviewing}} - {{reviewing}}
* {{tl|note}} - {{note}}
* {{tl|question}} - {{question}}
* {{tl|high priority}} - {{high priority}}
* {{tl|thank you}} - {{thank you}}
* {{tl|pending}} - {{pending}}
* {{tl|custom resolution}} - {{custom resolution|Earth Western Hemisphere transparent background.png|What on earth?}}
<section end=resolution-templates/>
== Voting templates ==
{{hatnote|Category: [[:Category:Voting templates|Voting templates]]}}
<section begin=voting-templates/>
* {{tl|support}} - {{support}}
* {{tl|oppose}} - {{oppose}}
* {{tl|abstain}} - {{abstain}}
* {{tl|neutral}} - {{neutral}}
<section end=voting-templates/>
== Social media userboxes ==
{{hatnote|Category: [[:Category:Social media userboxes|Social media userboxes]]}}
<section begin=social-media-userboxes/>
{| class="wikitable"
|-
<noinclude>! Template !! Result
|-</noinclude>
| {{tl|User discord}} || {{User discord|nocat=yes}}
|-
| {{tl|User github}} || {{User github|nocat=yes}}
|-
| {{tl|User instagram}} || {{User instagram|nocat=yes}}
|-
| {{tl|User IRC}} || {{User IRC|nocat=yes}}
|-
| {{tl|User twitter}} || {{User twitter|nocat=yes}}
|-
| {{tl|User wikimedia}} || {{User wikimedia|nocat=yes}}
|-
| {{tl|User youtube}} || {{User youtube|nocat=yes}}
|}
<section end=social-media-userboxes/>
[[Category:Templates| ]]
8e433f454d20d59b3b913e007e3d40f9e3c937eb
Template:Userbox
10
48
94
93
2024-02-01T19:43:02Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{#invoke:userbox|userbox}}<noinclude>{{documentation}}</noinclude>
6813e8e31cadc62df2379b5fae9ea23c23f29e97
Template:Utc
10
49
96
95
2024-02-01T19:43:02Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{#time:H:i|{{#expr:{{{1|0}}} * 60 + {{{2|0}}} round 0}} minutes}}<noinclude>
{{documentation}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>
d24309676bfe4692d038657a7171952e7d1cded7
Template:Welcome
10
50
98
97
2024-02-01T19:43:02Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#ifeq:{{{header}}}|no||== Welcome to Miraheze ==}}
{{{hello|Hello, <includeonly>{{subst:BASEPAGENAME}}</includeonly>, and welcome to {{<includeonly>safesubst:</includeonly>SITENAME}}!}}}
For more information, please see the Miraheze [[meta:FAQ|FAQ]] on Meta Wiki. If you have any additional questions, concerns, or comments, please feel free to see Meta Wiki's [[meta:Help center|help center]]. Local wiki assistance may be available at [[Help:Contents]].
You are encouraged to create your user page, whether here on {{<includeonly>safesubst:</includeonly>SITENAME}} (visible only when on {{<includeonly>safesubst:</includeonly>SITENAME}}, or your [[mw:Extension:GlobalUserPage|global user page]] that visible on ''any'' Miraheze wiki where a user '''''does not''''' have a local user page and provided that the wiki has the [[mw:Extension:GlobalUserPage|GlobalUserPage]] extension enabled and, additionally, where the wiki is not using the [[mw:Extension:SocialProfile|SocialProfile]] extension. Should you decide to create <includeonly>[[mh:login:User:{{subst:BASEPAGENAME}}|your global user page]]</includeonly> on [[mh:login|'''Loginwiki''']] and wish for it to ''replace'' your {{<includeonly>safesubst:</includeonly>SITENAME}} user page, simply add the {{tl|delete}} template to the ''top'' of [[Special:MyPage|your {{<includeonly>safesubst:</includeonly>SITENAME}} user page]]</includeonly> by copying and pasting this code (<code><nowiki>{{Delete|1=Author requests deletion}}</nowiki></code>), and an [[Project:Administrators|administrator]] should delete it promptly (usually within 24 hours).
If you have any questions, after first reviewing Meta Wiki's [[meta:FAQ|FAQ]] and [[meta:Help center|help center]], you may be able to ask for local wiki assistance usually at [[Project:Community portal]], but please be sure to end ''all'' new topics or replies you make on talk pages, user talk pages (like this one), and [[:Category:Noticeboards|noticeboards]] with four tildes (<includeonly>{{subst:meta:Nowiki four tildes}}</includeonly>) to include both (a) a username and (b) a [[meta:Autoarchive|properly formatted timestamp]] for our talk page archiving [[User:Revibot|bot]].
{{{thanks|Thanks,}}}
{{<includeonly>safesubst:</includeonly>#ifeq:{{{sig}}}|no||~~<noinclude/>~~}}<noinclude>
{{documentation}}
[[Category:Templates]]
</noinclude>
36fdc06b29e14633f6a95455281e1a85350afc04
Template:Description missing
10
51
100
99
2024-02-01T19:43:04Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<div class="boilerplate metadata" id="cleanup" style="text-align: center; background: #ffe; margin: .75em 15%; padding: .5em; border: 1px solid #e3e3b0;">
This media has no '''{{ #if: {{{1|}}} | {{{1}}} | description }}''', and may be lacking other information.
<br>
Media should have a summary to inform others of the content, author, source, and date if possible. If you know or have access to such information, please add it to the image page.
</div>
<includeonly>{{#switch:{{NAMESPACE}}|{{ns:6}}=|#default={{#ifeq:{{{category|}}}|no||[[Category:Images lacking a description|{{PAGENAME}}]]}}}}</includeonly><noinclude>
{{documentation}}
</noinclude>
2b5026cefd37c307f7f2ee331289c38741f834a5
Template:Uses TemplateStyles
10
52
102
101
2024-02-01T19:43:04Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<includeonly>{{#invoke:Uses TemplateStyles|main}}</includeonly><noinclude>
{{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}}
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
7e26d8f257e302bd8a3dcbe53f52741ae0884f74
Template:Header
10
53
104
103
2024-02-01T19:43:04Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{| style="width: 100% !important;"
|-
| style="border-top: 4px solid #{{{topbarhex|6F6F6F}}}; background-color: #{{{bodyhex|F6F6F6}}}; padding: 10px 15px;" | {{#if:{{{shortcut|}}}| {{shortcut|{{{shortcut|uselang={{{uselang|{{CURRENTCONTENTLANGUAGE}}}}}}}}}}}}<div style="font-size:180%; text-align: left; color: {{{titlecolor|}}}">'''{{{title|{{{1|{{BASEPAGENAME}}}}}}}}'''</div>
<div style="padding-top:0.3em; padding-bottom:0.1em; font-size:100%; text-align: left; color: {{{bodycolor|}}}">{{{notes|Put some notes here!}}}</div>
|-
| style="height: 10px" |
|}
{{clear}}<noinclude>{{documentation}}[[Category:templates]]</noinclude>
03aac86137ab11bfccbcceb2de919475af2953dd
Category:Documentation preloads
14
54
106
105
2024-02-01T19:43:05Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Template:See also
10
55
108
107
2024-02-01T19:43:05Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{hatnote|extraclasses=boilerplate seealso|{{{altphrase|See also}}}: {{#if:{{{1<includeonly>|</includeonly>}}} |<!--then:-->[[:{{{1}}}{{#if:{{{label 1|{{{l1|}}}}}}|{{!}}{{{label 1|{{{l1}}}}}}}}]] |<!--else:-->'''Error: [[Template:See also|Template must be given at least one article name]]'''
}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|, | and }} [[:{{{2}}}{{#if:{{{label 2|{{{l2|}}}}}}|{{!}}{{{label 2|{{{l2}}}}}}}}]]
}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|, |, and }} [[:{{{3}}}{{#if:{{{label 3|{{{l3|}}}}}}|{{!}}{{{label 3|{{{l3}}}}}}}}]]
}}{{#if:{{{4|}}}|{{#if:{{{5|}}}|, |, and }} [[:{{{4}}}{{#if:{{{label 4|{{{l4|}}}}}}|{{!}}{{{label 4|{{{l4}}}}}}}}]]
}}{{#if:{{{5|}}}|{{#if:{{{6|}}}|, |, and }} [[:{{{5}}}{{#if:{{{label 5|{{{l5|}}}}}}|{{!}}{{{label 5|{{{l5}}}}}}}}]]
}}{{#if:{{{6|}}}|{{#if:{{{7|}}}|, |, and }} [[:{{{6}}}{{#if:{{{label 6|{{{l6|}}}}}}|{{!}}{{{label 6|{{{l6}}}}}}}}]]
}}{{#if:{{{7|}}}|{{#if:{{{8|}}}|, |, and }} [[:{{{7}}}{{#if:{{{label 7|{{{l7|}}}}}}|{{!}}{{{label 7|{{{l7}}}}}}}}]]
}}{{#if:{{{8|}}}|{{#if:{{{9|}}}|, |, and }} [[:{{{8}}}{{#if:{{{label 8|{{{l8|}}}}}}|{{!}}{{{label 8|{{{l8}}}}}}}}]]
}}{{#if:{{{9|}}}|{{#if:{{{10|}}}|, |, and }} [[:{{{9}}}{{#if:{{{label 9|{{{l9|}}}}}}|{{!}}{{{label 9|{{{l9}}}}}}}}]]
}}{{#if:{{{10|}}}|{{#if:{{{11|}}}|, |, and }} [[:{{{10}}}{{#if:{{{label 10|{{{l10|}}}}}}|{{!}}{{{label 10|{{{l10}}}}}}}}]]
}}{{#if:{{{11|}}}|{{#if:{{{12|}}}|, |, and }} [[:{{{11}}}{{#if:{{{label 11|{{{l11|}}}}}}|{{!}}{{{label 11|{{{l11}}}}}}}}]]
}}{{#if:{{{12|}}}|{{#if:{{{13|}}}|, |, and }} [[:{{{12}}}{{#if:{{{label 12|{{{l12|}}}}}}|{{!}}{{{label 12|{{{l12}}}}}}}}]]
}}{{#if:{{{13|}}}|{{#if:{{{14|}}}|, |, and }} [[:{{{13}}}{{#if:{{{label 13|{{{l13|}}}}}}|{{!}}{{{label 13|{{{l13}}}}}}}}]]
}}{{#if:{{{14|}}}|{{#if:{{{15|}}}|, |, and }} [[:{{{14}}}{{#if:{{{label 14|{{{l14|}}}}}}|{{!}}{{{label 14|{{{l14}}}}}}}}]]
}}{{#if:{{{15|}}}|, and [[:{{{15}}}{{#if:{{{label 15|{{{l15|}}} }}}|{{!}}{{{label 15|{{{l15|}}} }}} }}]]
}}{{#if:{{{16|}}}| — '''<br/>Error: [[Template:See also|Too many links specified (maximum is 15)]]'''
}}}}<noinclude>
{{documentation}}
</noinclude>
0315f43d7e4b679054955c7a50fe554ab1df63de
Template:HoYoverse Wikis
10
56
110
109
2024-02-01T19:43:07Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{| style="border-radius:5px; width: 100%; border-radius: 15px; -moz-border-radius-topright:15px; -moz-border-radius-topleft:15px; -moz-border-radius-bottomright:15px; -moz-border-radius-bottomleft:15px;border: 3px solid black;" align="center"
|
{| cellspacing="3" width="100%"
| width="50%" valign="top" style="text-align: left;" |
<div style="font-size:115%; padding:5px">'''Miraheze Wikis about HoYoverse'''
* [https://hoyodex.miraheze.org/wiki/Main_Page HoYodex]
* [https://genshinimpact.miraheze.org/wiki/Genshin_Impact_Wiki Genshin Impact Wiki]
</div>
|}
|}<noinclude>[[Category:Templates]]</noinclude>
2ca26d3679675bb149a948e098fb692db7e5778b
Template:Pseudoheading
10
57
112
111
2024-02-01T19:43:07Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; {{#switch: {{{level|{{{sub|}}}}}}
| 1 = font-size: 1.8em; font-family: 'Linux Libertine',Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;
| 2 | #default = font-size: 1.5em; font-family: 'Linux Libertine',Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;
| 3 = font-size: 1.17em; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
| 4 = font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
| 5 = font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
| 6 = font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;
}}">{{{1|Section}}}</div><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
817a0347abab19312f02c90927c0f8b0e1e224a3
Template:Information
10
58
114
113
2024-02-01T19:43:08Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<templatestyles src="Information/style.css" />
<div class="hproduct commons-file-information-table">
<table class="toccolours vevent fileinfotpl-type-information" style="width: 100%;" cellpadding="4">
<!-- Description -->
<tr style="vertical-align: top">
<td id="fileinfotpl_desc" class="fileinfo-paramfield">Description<span class="summary fn" style="display:none">{{PAGENAME}}</span></td>
<td class="description">{{ #if: {{{description|{{{Description|{{{Descripción|{{{descripción|}}}}}}}}}}}} | {{{description|{{{Description|{{{Descripción|{{{descripción|}}}}}}}}}}}} | {{Description missing}} }}</td>
</tr>
<!-- Source -->
<tr style="vertical-align: top">
<td id="fileinfotpl_src" class="fileinfo-paramfield">Source</td>
<td>{{ #if: {{{source|{{{Source|{{{fuente|{{{Fuente|}}}}}}}}}}}} | {{{source|{{{Source|{{{fuente|{{{Fuente|}}}}}}}}}}}} | {{Description missing|source information}} }}</td>
</tr>
<!-- Author -->
<tr style="vertical-align: top">
<td id="fileinfotpl_aut" class="fileinfo-paramfield">Author</td>
<td>{{ #if: {{{author|{{{Author|{{{autor|{{{Autor|}}}}}}}}}}}} | {{{author|{{{Author|{{{autor|{{{Autor|}}}}}}}}}}}} | {{Description missing|author information}} }}</td>
</tr>
<!-- Fecha -->
<tr style="vertical-align: top">
<td id="fileinfotpl_aut" class="fileinfo-paramfield">Date</td>
<td>{{{date|{{{Date|{{{fecha|{{{Fecha|}}}}}}}}}}}}</td>
</tr>
<!-- Other versions -->
{{#switch: {{{other_versions|{{{Other_versions|{{{other versions|{{{Other versions|}}} }}} }}} }}}{{{demo|<noinclude>1</noinclude>}}}
| =
| - =
| none =
| #default =
<tr style="vertical-align: top">
<td id="fileinfotpl_ver" class="fileinfo-paramfield" style="background: #ccf; text-align: right; padding-right: 0.4em; width: 15%; font-weight:bold">Other versions</td>
<td>
{{{other_versions|{{{Other_versions|{{{other versions|{{{Other versions|}}} }}} }}} }}}
</td>
</tr>
}}
<!-- Additional information -->
{{#switch: {{{additional_information|{{{Additional_information|{{{additional information|{{{Additional information|}}} }}} }}} }}}{{{demo|<noinclude>1</noinclude>}}}
| =
| - =
| none =
| #default =
<tr style="vertical-align: top">
<td id="fileinfotpl_add" class="fileinfo-paramfield">Additional information</td>
<td>
{{{additional_information|{{{Additional_information|{{{additional information|{{{Additional information|}}} }}} }}} }}}
</td>
</tr>
}}
</table>
</div><noinclude>{{Documentation}}</noinclude>
1ebff63eb7a51e4949b69d5ddb96348d2305aa92
Category:Template stylesheets
14
59
116
115
2024-02-01T19:43:08Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[Category:Templates]]
06eecdec29f6cb215c99cf216d1e3bdc8c30a95e
Template:Soft redirect
10
60
118
117
2024-02-01T19:43:09Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
__NONEWSECTIONLINK__[[File:Softredirarrow.svg|64px|Soft redirect to:|link=]]<span class="redirectText" id="softredirect">[[:{{#invoke:String|match|1={{{1}}}|2=^:*(.-)$}}|{{{2|{{#invoke:String|match|1={{{1}}}|2=^:*(.-)$}}}}}]]</span><br /><span style="font-size:85%; padding-left:48px;">This page is a [[metawikimedia:soft redirect|soft redirect]].</span><noinclude>
{{Documentation}}
</noinclude>
a965c0fe43aa0fe8f0e17ed40d725f0e7b3649f6
Template:USERNAME
10
61
120
119
2024-02-01T19:43:10Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<span class="insertusername">{{{1|User}}}</span><noinclude>{{Documentation}}</noinclude>
d5a29404a80b77a70c990222f9a091c881103155
Template:Sp
10
62
122
121
2024-02-01T19:43:10Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
 <noinclude>{{Documentation}}</noinclude>
2d4b21d0fc5a5155e77130f9a6c22f7eaf0f357f
Template:Documentation/doc
10
63
124
123
2024-02-01T19:43:12Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{documentation subpage}}
This is the {{tl|Documentation}} template, used on almost every template page to contain that template's documented instructions and information.
For detailed instructions on how and when to use this template, see [[w:Wikipedia:Template documentation]].
This template displays a green documentation box like you are seeing now and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to.
This template is intended for documenting templates and other pages that are [[w:Wikipedia:Transclusion|transcluded]] onto other pages. It can be used in the [[w:Wikipedia:Template namespace|template namespace]] and most other [[w:Wikipedia:Namespace|namespace]]s.
Use of this template allows templates to be [[w:Wikipedia:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation and categories.
===Usage===
Normally this template is used without any parameters, placed at the bottom of the template or page being documented, within a <noinclude> container:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
</noinclude>
</syntaxhighlight>
Then this template automatically loads the content from the /doc subpage of the template it is used on.
This template can also load the content from any other page. Like this:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation |Template:Other page/doc}}
</noinclude>
</syntaxhighlight>
Note that when loading the documentation from a page other than the local /doc page it becomes tricky to handle the categories.
The content can also be fed directly as text. Like this:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation
| content =
(some documentation)
}}</noinclude>
</syntaxhighlight>
When the <nowiki>|content=</nowiki> parameter is used, the doc box normally does not show the [edit] [purge] links in the top right corner. Note that if the /doc page exists, a link to it is still shown in the link box below the doc box.
Parameter <nowiki>|1=</nowiki> and the <nowiki>|content=</nowiki> parameter can also be combined, like this:
<syntaxhighlight lang="xml+smarty">
<!--Last line of your template code--><noinclude>
{{Documentation |1=Template:Any page/doc
| content =
{{Template:Any page/doc |parameters}}
}}</noinclude>
</syntaxhighlight>
Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But the '''content''' parameter is used for the content shown in the doc box. The above code means that the content is transcluded as {{tlx|Any page/doc|parameters}}. In this example a parameter is also fed to the /doc page being loaded.
=== Shortcut ===
To automatically insert the [[w:Wikipedia:Noinclude|noinclude tags]], the template call and the guiding comment, use this [[w:WP:Substitution|substitution]] code:<br>
:<code><nowiki>{{subst:doc-code}}</nowiki></code>
===Best practice===
The code should be added at the bottom of the template code, with no space before <noinclude> (which would cause extra space on pages where the template is used).
Categories that apply to the template itself should be added to the bottom of the /doc subpage, inside <includeonly> tags.
If the documentation page contains <includeonly> or <noinclude> tags as part of the visible documentation text, replace the "<code><</code>" with "<code>&lt;</code>".
===Heading===
When in the Template namespace, this template shows this heading:
:[[File:Test Template Info-Icon - Version (2).svg|32px|link=[[w:Wikipedia:Template documentation]]]] '''Template documentation'''
In most other namespaces, such as "{{SITENAME}}:", it shows this heading:
:'''Documentation'''
But when on File (image) pages it shows this heading:
:'''Summary'''
The '''heading''' parameter can be used to set the heading to something else. Like this:
:<code><nowiki>{{Documentation |heading=Infobox documentation}}</nowiki></code>
If the '''heading''' parameter is empty but defined, no heading is shown and no [edit] [purge] links are shown. Like this:
:<code><nowiki>{{Documentation |heading=}}</nowiki></code>
The '''heading-style''' parameter can be fed optional [[w:Cascading Style Sheets|CSS]] values. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:
:<code>heading-style=font-size:150%;color:red;</code>
===Link box===
Below the big doc box is a small link box that shows some meta-data about the documentation. The link box shows different things depending on what parameters are fed to this template, and in which namespace it is used. In some cases the link box is not shown at all.
To hide the link box, add the parameter
: <nowiki>|link box=off</nowiki>.
You can also insert customised text into the link box, by setting the <nowiki>|link box=</nowiki> parameter. For example:
<pre style="width:auto; overflow:scroll">
|link box=This documentation is automatically generated by [[w:Template:Country showdata]]
</pre>
===Automatic functions===
If the documentation page does not exist, the [create] link includes a [[mw:Manual:Creating pages with preloaded text|preload]] page so that clicking it will pre-fill the edit form with the basic documentation page format. Preload text is also used for the /sandbox and /testcases [create] links.
===Subject namespaces vs. talk namespaces===
Terminology: ''Subject namespaces'' are the opposite of ''talk namespaces''. For instance "Template:" is the subject space of "Template talk:".
This template is usually placed in a subject namespace, within <noinclude> tags. But in some cases this template needs to be on the talk page:
* In the Mediawiki namespace, since <noinclude> often does not work in system messages, and since the Mediawiki namespace needs to be kept clean for performance reasons.
When placed on talk pages, this template usually is placed near the top of the page and without <noinclude> tags.
The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki [[w:m:Help:Link#Subpage feature|subpage feature]] enabled: Main, File, Mediawiki and Category. (But currently we only show the /sandbox and /testcases links from User, User talk, Template and Template talk namespaces.) There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those) namespaces.
This template automatically points its [create] links for the /doc, /sandbox and /testcases to the right namespace.
===Technical details===
The preload page for the /doc [create] link is [[Template:Documentation/preload]]. The preload pages for the /sandbox and /testcases [create] links are [[Template:Documentation/preload-sandbox]] and [[Template:Documentation/preload-testcases]]. The preload page for the /sandbox [mirror] link is [[Template:Documentation/mirror]].
====Full syntax====
<pre>
{{Documentation}}
{{Documentation
| content =
}}
{{Documentation
| [path to documentation page]
| heading-style =
| heading =
| link box =
}}
</pre>
===See also===
* {{tl|Documentation subpage}}, a notice placed at the top of a /doc subpage explaining its role and including a link to the page it documents.
* [[w:Wikipedia:Template documentation]] is a how-to guide to template documentation.
* [[w:Wikipedia:Template sandbox and test cases]] explains the use of /sandbox and /testcases subpages and includes more information about template testing.
92ff94e315af492eb2698f80537068806f486349
Template:Tl
10
64
126
125
2024-02-01T19:43:13Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
#REDIRECT [[Template:Template link]]
fb9a6b420e13178e581af6e7d64274cd30a79017
Template:Tlx
10
65
128
127
2024-02-01T19:43:13Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
#REDIRECT [[Template:Template link expanded]]
155e901040104f96908f1f4627c4eb3501301bf9
Template:=/doc
10
66
130
129
2024-02-01T19:43:14Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
== Usage ==
This template allows "=" to be used in unnamed template parameters. It inserts the [[w:equals-sign|equals-sign]] ("=") into the text. Alternatively, the [[w:HTML|HTML]] entity "&#61;" can be used if there is no need for it to be interpreted as wikimarkup, such as when the literal equals-sign is to be displayed to the user.
== Examples ==
* <code><nowiki>{{tlx|tlx|SISTER{{=}}M}}</nowiki></code> produces: {{tlx|tlx|SISTER{{=}}M}}
You can also use named parameters to bypass the restriction:
* <code><nowiki>{{tlx|tlx|2=SISTER=M}}</nowiki></code> produces: {{tlx|tlx|2=SISTER=M}}
== TemplateData ==
<templatedata>
{
"description": "A template to allow = to be used in template parameters",
"params": {},
"format": "{{_\n| _ = _\n}}"
}
</templatedata>
== See also ==
* [[mw:Help:Magic words]]
<includeonly>[[Category:Templates]]</includeonly>
6ddba85e618f6e260254e185a6f150c2785439b6
Template:Clear/doc
10
67
132
131
2024-02-01T19:43:14Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
== Description ==
This template makes content wait until existing content is completed in all columns. It is often used to prevent text from flowing next to unrelated images.
== Usage ==
* {{tlx|clear}} — adds <code><div style="clear:both;"></div></code>
* {{tlx|clear|left}} — adds <code><div style="clear:left;"></div></code>
* {{tlx|clear|right}} — adds <code><div style="clear:right;"></div></code>
== Examples ==
<div style="border: 1px solid black; background: #fde; padding: 1em; margin: 2em;">
=== Example without {{tl|clear}} ===
[[File:HeidelbergTun.jpg|200px|left]]
Lorem ipsum dolor sit amet
==== New section without template ====
Without {{tl|clear}}, this section starts at the right of the image.
{{clear}}
</div>
<div style="border: 1px solid black; background: #fde; padding: 1em; margin: 2em;">
=== Example that uses {{tl|clear}} ===
[[File:HeidelbergTun.jpg|200px|left]]
Lorem ipsum dolor sit amet<br/>
'''{{tl|clear}}'''
{{clear}}
==== New section with template ====
{{tl|clear}} placed before this section, so it appears below the image.
</div>
== TemplateData ==
<templatedata>{
"description": "Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images, so text will appear on a full width line under the image.",
"params": {
"1": {
"label": "Side",
"description": "Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.",
"type": "line",
"required": false,
"suggestedvalues": [
"right",
"left",
"both"
]
}
},
"format": "inline"
}</templatedata>
<includeonly>[[Category:Templates]]</includeonly>
58226a453dd4b97c96cfce56dd0251c877f7019e
Template:Discussion top/doc
10
68
134
133
2024-02-01T19:43:14Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
The {{Tlx|Discussion top}} and {{Tlx|Discussion bottom}} templates are used to close discussions on a talk page or a noticeboard.
== Usage ==
Place {{Tlx|Discussion top}} '''below''' the header containing the discussion, then place {{Tlx|Discussion bottom}} at the end of the discussion. A summary of the conclusions reached may be included as a parameter in the former.
Again: '''Place them below the header. Do not include the header, it will break archiving bots!'''
=== Example ===
<syntaxhighlight lang="moin">
== Header ==
{{Discussion top|reason=The result of this discussion was '''template created'''. ~~~~}}
I suggest that we make a template to note completed discussions. [[User:Example|Example]] ([[User talk:Example|talk]]) 13:05, 29 August 2015 (UTC)
* How about calling it ''discussion top'' and ''discussion bottom''? [[User:John|John]] ([[User talk:John|talk]]) 06:44, 3 September 2015 (UTC)
{{Discussion bottom}}
</syntaxhighlight>
Would produce:
{{Discussion top|reason=The result of this discussion was '''template created'''. [[User:Example|Example]] ([[User talk:Example|talk]]) {{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)}}
I suggest that we make a template to note completed discussions. [[User:Example|Example]] ([[User talk:Example|talk]]) 13:05, 29 August 2015 (UTC)
* How about calling it ''discussion top'' and ''discussion bottom''? [[User:John|John]] ([[User talk:John|talk]]) 06:44, 3 September 2015 (UTC)
{{Discussion bottom}}
<includeonly>
[[Category:Templates]]
</includeonly>
984eaa40720d1ced466a73a36055e282eb429103
Module:Reply to
828
69
136
135
2024-02-01T19:43:15Z
Bonclide
2
1 revision imported
Scribunto
text/plain
local p = {}
local function makeError(msg)
msg ='Error in [[Template:Reply to]]: ' .. msg
return mw.text.tag('strong', {['class']='error'}, msg)
end
function p.replyto(frame)
local origArgs = frame:getParent().args
local args = {}
local maxArg = 1
local usernames = 0
for k, v in pairs(origArgs) do
if type(k) == 'number' then
if mw.ustring.match(v,'%S') then
if k > maxArg then maxArg = k end
usernames = usernames + 1
local title = mw.title.new(v)
if not title then return makeError('Input contains forbidden characters.') end
args[k] = title.rootText
end
elseif v == '' and k:sub(0,5) == 'label' then
args[k] = '​'
else
args[k] = v
end
end
if usernames > (tonumber(frame.args.max) or 50) then
return makeError(string.format(
'More than %s names specified.',
tostring(frame.args.max or 50)
))
else
if usernames < 1 then
if frame.args.example then args[1] = frame.args.example else return makeError('Username not given.') end
end
args['label1'] = args['label1'] or args['label']
local isfirst = true
local outStr = args['prefix'] or '@'
for i = 1, maxArg do
if args[i] then
if isfirst then
isfirst = false
else
if ( (usernames > 2) or ((usernames == 2) and (args['c'] == '')) ) then outStr = outStr..', ' end
if i == maxArg then outStr = outStr..' '..(args['c'] or 'and') .. ' ' end
end
outStr = string.format(
'%s[[User:%s|%s]]',
outStr,
args[i],
args['label'..tostring(i)] or args[i]
)
end
end
outStr = outStr..(args['p'] or ':')
return mw.text.tag('span', {['class']='template-ping'}, outStr)
end
end
return p
14f0cd73a8a9f122c0e0e15382219083c602c62a
Template:Ping/doc
10
70
138
137
2024-02-01T19:43:15Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
This template is used to link one or more users' names, in the form "<kbd>@Username:</kbd>", to trigger a [[mw:Notifications|notification]] for user(s) you are replying to in a discussion. The notification will work successfully only if you sign your post in the same edit in which you use this template. It works on any talk page or Project namespace page.
'''You cannot directly type the "@" symbol to notify a user of your reply, you must use the template documented here or manually create a [[w:WP:WIKILINK|wikilink]] to their [[w:WP:USERPAGE|user page]].<br /> The "@" symbol is used by this template for display purposes only.'''
This template is particularly helpful in discussions that are not threaded, to indicate which user's comment is referenced. If you feel that this template unnecessarily personalizes the discussion, you may still post on the user's talk page to indicate that you have replied to a comment. IP addresses are only notified if you post to their user talk page.
==Usage==
{| class="wikitable"
!Template !! Result
|-
|{{tlx|ping|Example}} || {{ping|Example}}
|-
|{{tlx|ping|Example|John}} || {{ping|Example|John}}
|}
=== Single recipient ===
Use the following syntax:
<nowiki>{{ping|Username}} Message text. ~~~~</nowiki>
For example, <code>{{tlx|ping|Example}}</code> generates "@[[User:Example|Example]]:" and notifies [[User:Example|Example]]
=== Multiple recipient ===
You can reply to up to 50 people at once. Use the following syntax:
<nowiki>{{ping|User1|User2|User3|User4|User5|User6|User7|User8|User9|User10|...}} Message text. ~~~~</nowiki>
For example, <code><nowiki>{{ping|Example|John}}</nowiki></code> will produce:
{{ping|Example|John}}
[[File:Ambox warning pn.svg|20px|link=|alt=⚠]] '''<span style="color:red;">''Warning:''</span> If the total number of detected to-be-pinged users in an edit exceeds 50, no notifications will be delivered.''' This is a software limit, and applies to the entire edit, even if the mentions are split between multiple templates. If you need to ping more than 50 users, it will need to be spread across multiple edits, and each edit needs to add new lines and be signed by you.
__NOTOC__
<includeonly>[[Category:Templates]]</includeonly>
7a73b565aafb50107950839672dc3bf51b8597c5
Template:Talk quote inline/styles.css
10
71
140
139
2024-02-01T19:43:16Z
Bonclide
2
1 revision imported
sanitized-css
text/css
.inline-quote-talk {
font-family: Georgia, 'DejaVu Serif', serif;
color: #008560;
quotes: none;
}
.inline-quote-talk-italic {
font-family: inherit;
font-style: italic;
}
.inline-quote-talk-marks {
quotes: '"' '"';
}
/* [[Category:Template stylesheets]] */
4434a2aa81c34f55d7218b590243121c2f44b366
Template:Tq
10
72
142
141
2024-02-01T19:43:16Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
#REDIRECT [[Template:Talk quote inline]]
f07470ea0200fa3540084bcca7efa9e7e929ba21
Template:Talk quote inline/doc
10
73
144
143
2024-02-01T19:43:16Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{documentation subpage}}
== Usage ==
Template {{tlx|talk quote inline}} (aka {{tl|tq}}) is used on talk pages to highlight a short excerpt of quoted material from elsewhere
By default, the template changes the given text to {{tq|serif typeface and green color}}. The accompanying change in typeface to a serif (roman) or italic type style ({{tq|i=y|example text}}) is to make it fully accessible for those readers with red/ green color blindness.
===Parameters===
<nowiki>1=</nowiki> The text to highlight with the template. As with all templates, when the text, given as the template parameter, contains an equals character (<code>=</code>), prefixing the text with <nowiki>1=</nowiki> is required to ensure the character is correctly interpreted as being part of the normal text; otherwise it will break the template.
<nowiki>italic=yes</nowiki> or <nowiki>i=yes</nowiki> will force the content to be {{tq|i=y|green and italicised only}} (no change to serif font style); any value may be used, e.g. <nowiki>i=y</nowiki>. This is typically used inside a block of text that is already serif-styled to make the highlighted text stand out better.
<nowiki>|title=</nowiki> takes text, which cannot be marked up in any way, and displays it as a pop-up "tooltip" (in most browsers) when the cursor hovers over the span. The most common use of this is to provide attribution.
<nowiki>|q=yes</nowiki> or <nowiki>|quotes=yes</nowiki> adds quotation marks around the colored text.
=== Examples ===
; What you write:
: <code><nowiki>...when you said, {{tq|Lorem ipsum '''dolor''' sit}}, and, {{tq|consectetur adipiscing elit|i=yes|title=This is a tooltip}}.</nowiki></code>
; What you get:
: ...when you said, {{tq|Lorem ipsum '''dolor''' sit}}, and, {{tq|consectetur adipiscing elit|i=yes|title=This is a tooltip}}.
; What you write:
: <code><nowiki>...when you said, {{tq|Lorem ipsum '''dolor''' sit|q=yes}}, and, {{tq|consectetur adipiscing elit|q=yes|i=yes|title=This is a tooltip}}.</nowiki></code>
; What you get:
: ...when you said, {{tq|Lorem ipsum '''dolor''' sit|q=yes}}, and, {{tq|consectetur adipiscing elit|q=yes|i=yes|title=This is a tooltip}}.
(Run your mouse over the words "consectetur adipiscing elit" and in a second you will see a tooltip pop up next to the mouse cursor which says, "This is a tooltip".)
== TemplateData ==
<templatedata>
{
"params": {
"1": {
"label": "Text",
"description": "Text to highlight",
"type": "content",
"required": true
},
"title": {
"label": "Title",
"description": "Takes text, which cannot be marked up in any way, and displays it as a pop-up \"tooltip\" (in most browsers) when the cursor hovers over the span. The most common use of this is to provide attribution.",
"type": "string"
},
"italic": {
"aliases": [
"i"
],
"label": "Italic?",
"description": "Makes the content italicised and the same san-serif font as normal text",
"type": "boolean"
},
"quotes": {
"aliases": [
"q"
],
"label": "Quotes?",
"description": "Adds quotation marks around the colored text",
"type": "boolean"
}
},
"description": "Highlights a short excerpt of quoted material of other editors' comments or from an article or source"
}
</templatedata>
<includeonly>[[Category:Templates]]</includeonly>
e6ac7dd0b665c769e13dbc1f0f2a03d35f8bd9d4
Template:Template link/doc
10
74
146
145
2024-02-01T19:43:17Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->
The '''template link''' (or "tl") template is a simple [[w:Macro (computer science)|macro]] [[m:Help:template|template]] used to display a template name as a link surrounded by braces, thus showing the template name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a template by name without invoking it.
==Examples==
An example of its use is:
::<code><nowiki>{{tl|Example}}</nowiki></code>
:which generates
::{{tl|Example}}
== TemplateData ==
<templatedata>{
"description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.",
"params": {
"1": {
"label": "template name",
"description": "positional parameter: the template name without the namespace prefix “Template:”, which is added automatically",
"type": "wiki-template-name",
"required": true
}
}
}</templatedata>
== See also ==
* {{tl|tlx}} to produce a [t]emplate [l]ink with an e[x]panded number of parameters.
<includeonly>[[Category:Templates]]</includeonly>
ca1918b14339b6bc271b9443e50b876de6a02c3d
Template:Template link expanded/doc
10
75
148
147
2024-02-01T19:43:17Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
This template is used to show example template usage without expanding the template itself.
==Basic use==
''(Note: In the following examples, [[w:Ellipsis|ellipses (groups of three dots)]] indicate where parameters have been omitted.)''
: {{tlx||tlx|Template|''first parameter''|''second parameter''|''third parameter''|...|''tenth parameter''}} produces: {{tlx|Template|''first parameter''|''second parameter''|''third parameter''|...|''tenth parameter''}}
When you want to indicate setting a value to one or more parameters, you would normally use the equals-sign ("="). This doesn't work here; instead use {{tlx|{{=}}}}, like so:
: {{tlx|tlx|Template|''first''<nowiki>{{=}}</nowiki>''first value''|''second''|''third''<nowiki>{{=}}</nowiki>''third value''}} produces: {{tlx{|Template|''firstfirst value''|''second''|''third{{=}}third value''}}
For more than ten parameters – with or without equals-signs – instead wrap the entire list of parameters and their values in <nowiki> tags. When you do, you don't need to replace equals-signs. For instance:
: {{tlx|tlx|Template|<nowiki><nowiki>''first''|''second''|''third=value''|...|''999th''</nowiki></nowiki>}} produces: {{tlx|Template|<nowiki>first|second|third=value|...|999th</nowiki>}}
==Purpose and naming==
Mnemonically, ''template link expanded'' (after ''[[Template:tl|template link]]'').
This template allows an example of calling a template, accompanied by one or more parameters to be displayed without also causing the template to be called.
Up to 20 of the template's parameters (numbered or nowiki-keywords) may be displayed as placeholders, while more than over 20 parameters can be displayed using a coded vertical bar (pipe) symbol, as in <code>&#124;</code>. A keyword parameter can be used with equals code &#61; or <nowiki>{{=}}</nowiki> or in nowiki-text: <code><nowiki>content=size=10</code>" or all parameters as a string in <nowiki> tags. If you use 21 or more parameters, all after the 20th will be replaced with a single <code><nowiki>|...</nowiki></code> at the end of the parameter list.
; Exceptions
If the intended template lists numerous parameters, then perhaps this template should really not be used, and just hardcode the usage with <code><nowiki>. For example:
: <code><code><nowiki&ht;<nowiki>{{Anytemplate|arg1=23|size=250px|</nowiki><var>other parameters...</var><nowiki>}}</nowiki></nowiki></code></code>
If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>
===Parameters===
*If the only parameter supplied is the template's name, {{tlx|tlx}}'s output is the same as {{tlx|tl}} – i.e. a link within [[w:Braces (punctuation)|braces]] – but in a [[w:monospaced font|monospaced font]]:
**{{tlx|tl|tl}} produces: {{tl|tl}}
**{{tlx|tlx|tl}} produces: {{tlx|tl}}
: {{tlx|tl}} will also not take nor display additional parameters.
; Named parameters
<nowiki>|subst=</nowiki>
: Setting this parameter to any non-blank value will prefix the string <code>subst:</code> linked to [[Help:Substitution]]. This is useful to indicate when a template should be substituted. For example, {{tlx|tlx|Welcome|3=subst=Y}} produces: {{tlx|Welcome|subst=Y}}.
<nowiki>|SISTER=</nowiki>
: For an interwiki link to [[w:H:IW|other sister projects]], such as: <code><nowiki>SISTER=M:</nowiki></code> ([[m:|Meta]]), facilitating interwiki template documentation and/or discussion.
==Documentation==
{{tl|Tlx}} is a generalization of {{tl|tl|x}} with output that is arguably more legible. This depends on the browser, but narrow gaps between characters such as "'''{'''", "''|'''", "'''}'''" and links can be hard to read when not monospaced.
===Usage===
:<code>{{tlx{{!}}Templatename}}</code>
:<code>{{tlx{{!}}Templatename{{!}}param}}</code>
:<code>{{tlx{{!}}Templatename{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10}}</code>
:<code>{{tlx{{!}}Templatename{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10&#124;more}}</code>
:<code>{{tlx{{!}}Templatename{{!}}param&#61;value}}</code>
There are up to 10 placeholders for parameters of the specified template.
==TemplateData==
<templatedata>
{
"params": {
"1": {
"label": "Template name",
"description": "Name of the template to link.",
"example": "Tlx",
"type": "wiki-template-name",
"required": true
},
"2": {
"label": "1st parameter",
"type": "string"
},
"3": {
"label": "2nd parameter",
"type": "string"
},
"4": {
"label": "3rd parameter",
"type": "string"
},
"5": {
"label": "4th parameter",
"type": "string"
},
"6": {
"label": "5th parameter",
"type": "string"
},
"7": {
"label": "6th parameter",
"type": "string"
},
"8": {
"label": "7th parameter",
"type": "string"
},
"9": {
"label": "8th parameter",
"type": "string"
},
"10": {
"label": "9th parameter",
"type": "string"
},
"11": {
"label": "10th parameter",
"type": "string"
},
"12": {
"label": "11th parameter",
"type": "string"
},
"13": {
"label": "12th parameter",
"type": "string"
},
"14": {
"label": "13th parameter",
"type": "string"
},
"15": {
"label": "14th parameter",
"type": "string"
},
"16": {
"label": "15th parameter",
"type": "string"
},
"17": {
"label": "16th parameter",
"type": "string"
},
"18": {
"label": "17th parameter",
"type": "string"
},
"19": {
"label": "18th parameter",
"type": "string"
},
"20": {
"label": "19th parameter",
"type": "string"
},
"21": {
"label": "20th parameter",
"type": "string"
},
"subst": {
"description": "Set to any value to show \"subst:\" before the template name",
"example": "true",
"type": "boolean",
"label": "Show subst:"
},
"LANG": {
"label": "Language",
"description": "The prefix for a link to Wikipedias in other languages.",
"example": "de:",
"type": "line"
},
"SISTER": {
"description": "The prefix for an interwiki link to other sister projects",
"example": "M:",
"type": "line",
"label": "Sister project"
}
},
"description": "Show example template usage without expanding the template itself. {{tnull}} is similar without linking the template.",
"paramOrder": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"subst",
"LANG",
"SISTER"
],
"format": "inline"
}
</templatedata>
<includeonly>[[Category:Templates]]</includeonly>
a578d758a00a0dd445a37710f39bb01ad96758dd
Template:Done
10
76
150
149
2024-02-01T19:43:18Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<span class="nowrap">[[File:Yes check.svg|18px|link=|alt=]] '''{{{1|Done}}}'''</span>{{{{{|safesubst:}}}#if:{{{2|{{{note|{{{reason|}}}}}}}}}|: {{{2|{{{note|{{{reason}}}}}}}}}}}<noinclude>
{{documentation}}
[[Category:Resolution templates]]</noinclude>
717c1385d516cd84dc05a10ba88359a52c9d8415
Template:Not done
10
77
152
151
2024-02-01T19:43:18Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:X mark.svg|18px]] '''{{{1|Not done}}}'''<noinclude>
{{documentation}}
[[Category:Resolution templates]]
</noinclude>
fd025e245bee74ddd6c5ae757f983a3cd3258d94
Template:Support
10
78
154
153
2024-02-01T19:43:19Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{ #switch: {{{4|{{{1|}}}}}}
| Regular= [[File:Symbol support vote.svg|18px|alt=]]
| Normal= [[File:Symbol support vote.svg|18px|alt=]]
| Strongly= [[File:Symbol strong support vote.svg|18px|alt=]]
| Strongest= [[File:Symbol full support vote.svg|22px]]
| Strong= [[File:Symbol strong support vote.svg|18px|alt=]]
| Weak= [[File:Symbol partial support vote.svg|18px|alt=]]
| Weakly= [[File:Symbol partial support vote.svg|18px|alt=]]
| strongly= [[File:Symbol strong support vote.svg|18px|alt=]]
| strong= [[File:Symbol strong support vote.svg|18px|alt=]]
| weak= [[File:Symbol partial support vote.svg|18px|alt=]]
| weakly= [[File:Symbol partial support vote.svg|18px|alt=]]
|#default= [[File:Symbol support vote.svg|18px|alt=]]
}} {{ #switch: {{{1|}}}
| Regular='''Support'''
| Normal= '''Support'''
| Strongly= '''Strongly support'''
| Strong= '''Strong support'''
| Weak= '''Weak support'''
| Weakly= '''Weakly support'''
| strongly= '''Strongly support'''
| Strongest= '''''Strongest support'''''
| strong= '''Strong support'''
| weak= '''Weak support'''
| weakly= '''Weakly support'''
| {{{other|2}}} = '''{{{3}}}'''
|#default= '''Support'''
}}<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
0a43c05b804693f20b74446f7e7e6d7ccd10c516
Template:Agree
10
79
156
155
2024-02-01T19:43:19Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Symbol confirmed.svg|18px|link=]] '''{{{1|Agree}}}'''<noinclude>{{documentation}}</noinclude>
775ddedaccda0d477a1b3c82d422e3760c862609
Template:Comment
10
80
158
157
2024-02-01T19:43:20Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Pictogram voting comment.svg|18px|link=]] '''{{{1|Comment:}}}'''<noinclude>{{documentation}} [[Category:Resolution templates]]</noinclude>
5f48a21f6ec3dc6d82cfa7a668c9e00fec175396
Template:Custom resolution
10
81
160
159
2024-02-01T19:43:20Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<span class="nowrap">[[File:{{{1|Cancelled process mini.svg}}}|18px|alt={{{2|Text here}}}]] <span style="{{{3|">'''{{{2|Text here}}}'''</span></span>
<noinclude>{{Documentation|content=
This template allows for the creation of custom [[Template:Template list#Resolution templates|resolution templates]] using 2 parameters.
}}[[Category:Resolution templates]]</noinclude>
a563b1f700886c4f97480a7ee81988b33af01ccf
Template:Doing
10
82
162
161
2024-02-01T19:43:21Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Pictogram voting wait.svg|18px|link=|alt=]] '''{{{1|Doing…}}}'''<noinclude>
{{documentation}}
[[Category:Resolution templates]]
</noinclude>
eb1feacb3d7a14829c6a9be311732ee0d24d35f3
Template:High priority
10
83
164
163
2024-02-01T19:43:21Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Exclamationdiamond.svg|20px|link=]] '''{{{1|High Priority}}}'''{{{{{|safesubst:}}}#if:{{{note|{{{reason|}}}}}}|<nowiki />: {{{note|{{{reason}}}}}}}}<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
65d49ca7f928fef46651d89d894267497560a60b
Template:Idea
10
84
166
165
2024-02-01T19:43:22Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Dialog-information on.svg|18px|link=]] '''{{{1|Idea}}}:'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
e4062daed60634ce9e9cd2f052d9102bcf7e2916
Template:Note
10
85
168
167
2024-02-01T19:43:22Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Pictogram voting info.svg|18px|link=]] '''{{{1|Note:}}}'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
4d5cae62908f9cc8da2988712b236fe939bc80e2
Template:On hold
10
86
170
169
2024-02-01T19:43:23Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Symbol wait.svg|18px]] '''{{{1|On hold}}}'''<noinclude>[[Category:Resolution templates]]<noinclude>
{{documentation}}
[[Category:Resolution templates]]</noinclude>
7a18e8aa8c80a33b1a68eed60d0993a75202162f
Template:Partly done
10
87
172
171
2024-02-01T19:43:23Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<span class="nowrap">[[File:Yellow_check.svg|18px|link=|alt=]] '''{{{1|Partly done}}}'''</span>{{{{{|safesubst:}}}#if:{{{2|{{{note|{{{reason|}}}}}}}}}|: {{{2|{{{note|{{{reason}}}}}}}}}}}<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
24a90b5a5c4c716b7ec12889fbd09a1da2ba1ca3
Template:Pending
10
88
174
173
2024-02-01T19:43:23Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{On hold|{{{1|Pending}}}}}<noinclude>{{Documentation}}</noinclude>
3d534f8f2cf14f73be843d306efcecbff05c7f5e
Template:Question
10
89
176
175
2024-02-01T19:43:24Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Pictogram voting question.svg|18px|link=]] '''{{{1|Question:}}}'''<noinclude>{{documentation}} [[Category:Resolution templates]]</noinclude>
9fae3d5ccc70d95a5a7de8983d7a82c1a55853e3
Template:Resolved
10
91
178
177
2024-02-01T19:43:24Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<span class="nowrap">[[File:Yes check.svg|18px|link=]] '''{{{1|Resolved}}}'''</span>{{{{{|safesubst:}}}#if:{{{2|{{{note|{{{reason|}}}}}}}}}|: {{{2|{{{note|{{{reason}}}}}}}}}}}<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
bcebb832c81fc395e8891f82747510f76292cb34
Template:Reviewing
10
92
180
179
2024-02-01T19:43:25Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Pictogram voting wait green.svg|17px|link=]] '''{{{1|Reviewing}}}...'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
0184f75a66f991d9eb99f23a75df36dd184e0c4b
Template:Thank you
10
93
182
181
2024-02-01T19:43:25Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
<span class="nowrap">[[File:Face-smile.svg|18px|link=]] '''{{{1|Thank you}}}'''</span><noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
4312420b6485d1eb316af5c56f663a7d618afb9b
Template:Withdrawn
10
94
184
183
2024-02-01T19:43:26Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Cancelled process mini.svg|200x20px|link=|alt=]] '''{{{1|Request withdrawn}}}'''<noinclude>{{documentation}}</noinclude>
24c0cd218d3a61ac8b524c6f8d1b5cc405ca3d80
Template:Working
10
95
186
185
2024-02-01T19:43:26Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Icon tools.svg|20px|link=]] '''{{{1|Working}}}'''<noinclude>{{documentation}}[[Category:Resolution templates]]</noinclude>
0619210f08d5114b9a348b4f1045a0b6f4552012
Module:Yesno
828
96
188
187
2024-02-01T19:43:26Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
f767643e7d12126d020d88d662a3dd057817b9dc
Template:Abstain
10
97
190
189
2024-02-01T19:43:27Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Symbol neutral vote.svg|18px]] '''<bdi>{{{1|Abstain}}}</bdi>'''<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
b1098b70832376165658562bfc8de5b6187bdb26
Template:Neutral
10
98
192
191
2024-02-01T19:43:27Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
[[File:Symbol neutral vote.svg|18px]] '''<bdi>{{{1|Neutral}}}</bdi>'''<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
59552c46cb01ccf2c6196bdea9ec3eb90858e675
Template:Oppose
10
99
194
193
2024-02-01T19:43:28Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{ #switch: {{{4|{{{1|}}}}}}
| Regular= [[File:Symbol oppose vote.png|18px|alt=]]
| Normal= [[File:Symbol oppose vote.png|18px|alt=]]
| Strongly= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| Strong= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| Strongest = [[File:Symbol full oppose vote.svg|20px|alt=]]
| Weak= [[File:Weak Oppose.png|18px|alt=]]
| Weakly= [[File:Weak Oppose.png|18px|alt=]]
| strongly= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| strong= [[File:Symbol oppose vote oversat.svg|18px|alt=]]
| weak= [[File:Weak Oppose.png|18px|alt=]]
| weakly= [[File:Weak Oppose.png|18px|alt=]]
| strongest = [[File:Symbol full oppose vote.svg|20px|alt=]]
|#default= [[File:Symbol oppose vote.svg|18px|alt=]]
}} {{ #switch: {{{1|}}}
| Regular='''Oppose'''
| Normal= '''Oppose'''
| Strongest = '''Strongest oppose'''
| Strongly= '''Strongly oppose'''
| Strong= '''Strong oppose'''
| Weak= '''Weak oppose'''
| Weakly= '''Weakly oppose'''
| strongly= '''Strongly oppose'''
| strong= '''Strong oppose'''
| weak= '''Weak oppose'''
| weakly= '''Weakly oppose'''
| strongest = '''Strongest oppose'''
| {{{other|2}}} = '''{{{3}}}'''
|#default= '''Oppose'''
}}<noinclude>{{documentation}}[[Category:Voting templates]]</noinclude>
8c57115a1c36446a717d2c874b2895b057d1ffc3
Template:User IRC
10
100
196
195
2024-02-01T19:43:28Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = #
| id-s = 24
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} chats on [[m:IRC|IRC]]{{#if:{{{nick|}}}| as ''{{{nick}}}''|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use IRC
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
a148152ff16bb6fc7f7a7bd46c4898b50f1996fc
Template:User discord
10
101
198
197
2024-02-01T19:43:28Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = #
| id-s = 24
| id-fc = #5865F2
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} chats on [[m:Discord|Discord]]{{#if:{{{account|}}}| as ''{{{account}}}''|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use Discord
}}<noinclude>{{Documentation}}[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
19b1d90000718152b9058c16c7c1ba13d7cb2715
Template:User github
10
102
200
199
2024-02-01T19:43:29Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = [[File:GitLogo.png|43px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has an account on GitHub{{#if:{{{account|}}}| as ''[[github:{{{account}}}|{{{account}}}]]''|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use GitHub
}}<noinclude>{{Documentation}}[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
08ef531d5b5a1e69b84939e0fc1f1d0d622f38ad
Template:User instagram
10
104
202
201
2024-02-01T19:43:29Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = [[File:Instagram icon.png|37px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has an {{#if:{{{account|}}}| account [https://instagram.com/{{{account}}} '''@{{{account}}}''']|account}} on Instagram.
| nocat = {{{nocat|}}}
| usercategory = Users who use Instagram
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
1178ad0721de804c08dd554ebb4b52c4c6569fde
Template:User twitter
10
105
204
203
2024-02-01T19:43:30Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = [[File:Twitter-logo.svg|frameless|upright=0.1]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} tweets on Twitter{{#if:{{{account|{{{1|}}}}}}| as [https://twitter.com/{{{account|{{{1}}}}}} '''@{{{account|{{{1}}}}}}''']|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use Twitter
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
58e5f4979e17a891445f4f463a9d7cc90b58166b
Template:User wikimedia
10
106
206
205
2024-02-01T19:43:30Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = [[File:Wikimedia Foundation Logo.png|43px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has an [[metawikimedia:Special:CentralAuth/{{{account|{{BASEPAGENAME}}}}}|account]] at the Wikimedia Foundation projects.
| nocat = {{{nocat|}}}
| usercategory = Wikimedians
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
c7b06f2b4d088ee94d893eb1e3548e9e0562fc5e
Template:User youtube
10
107
208
207
2024-02-01T19:43:30Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Userbox
| id = [[File:YouTube full-color icon (2017).svg|37px]]
| float = {{{float|right}}}
| border-c = #808080
| id-c = #FFFFFF
| info-c = #DBDBDB
| info = {{#if:{{{username|}}}|''{{PAGENAME}}''|This user}} has a YouTube channel{{#if:{{{account|}}}| at [https://{{{account}}} '''{{{account}}}''']|}}.
| nocat = {{{nocat|}}}
| usercategory = Users who use YouTube
}}<noinclude>{{Documentation}}
[[Category:Social media userboxes|{{PAGENAME}}]]</noinclude>
f0ba1080f2a2d69494317a9790fa3d7e6e4239b4
Module:Userbox
828
108
210
209
2024-02-01T19:43:31Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- This module implements {{userbox}}.
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function checkNum(val, default)
-- Checks whether a value is a number greater than or equal to zero. If so,
-- returns it as a number. If not, returns a default value.
val = tonumber(val)
if val and val >= 0 then
return val
else
return default
end
end
local function addSuffix(num, suffix)
-- Turns a number into a string and adds a suffix.
if num then
return tostring(num) .. suffix
else
return nil
end
end
local function checkNumAndAddSuffix(num, default, suffix)
-- Checks a value with checkNum and adds a suffix.
num = checkNum(num, default)
return addSuffix(num, suffix)
end
local function makeCat(cat, sort)
-- Makes a category link.
if sort then
return mw.ustring.format('[[Category:%s|%s]]', cat, sort)
else
return mw.ustring.format('[[Category:%s]]', cat)
end
end
--------------------------------------------------------------------------------
-- Argument processing
--------------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local origArgs = require('Module:Arguments').getArgs(frame)
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.main(funcName, args)
end
end
p.userbox = makeInvokeFunc('_userbox')
p['userbox-2'] = makeInvokeFunc('_userbox-2')
p['userbox-r'] = makeInvokeFunc('_userbox-r')
--------------------------------------------------------------------------------
-- Main functions
--------------------------------------------------------------------------------
function p.main(funcName, args)
local userboxData = p[funcName](args)
local userbox = p.render(userboxData)
local cats = p.categories(args)
return userbox .. (cats or '')
end
function p._userbox(args)
-- Does argument processing for {{userbox}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args[1] or args['border-c'] or args['id-c'] or '#999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee'
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt')
data.infoHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em'
data.infoColor = args['info-color'] or args['info-fc'] or 'black'
data.infoOtherParams = args['info-other-param'] or args['info-op']
data.infoClass = args['info-class']
-- Get id values.
local id = args.logo or args[3] or args.id
data.id = id
data.showId = id and true or false
data.idWidth = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.idBackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd'
data.idTextAlign = args['id-a'] or 'center'
data.idFontSize = checkNumAndAddSuffix(args['logo-size'] or args[5] or args['id-s'], 14, 'pt')
data.idColor = args['logo-color'] or args['id-fc'] or data.infoColor
data.idPadding = args['logo-padding'] or args['id-p'] or '0 1px 0 0'
data.idLineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em'
data.idOtherParams = args['logo-other-param'] or args['id-op']
data.idClass = args['id-class']
return data
end
p['_userbox-2'] = function (args)
-- Does argument processing for {{userbox-2}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args[9] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args[1] or args['border-c'] or args['id1-c'] or '#999999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args[2] or args['info-c'] or '#eeeeee'
-- Get info values.
data.info = args[4] or args.info or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-s'], 8, 'pt')
data.infoColor = args[8] or args['info-fc'] or 'black'
data.infoPadding = args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-lh'] or '1.25em'
data.infoOtherParams = args['info-op']
-- Get id values.
data.showId = true
data.id = args.logo or args[3] or args.id1 or 'id1'
data.idWidth = checkNumAndAddSuffix(args['id1-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['id-h'], 45, 'px')
data.idBackgroundColor = args[1] or args['id1-c'] or '#dddddd'
data.idTextAlign = 'center'
data.idFontSize = checkNumAndAddSuffix(args['id1-s'], 14, 'pt')
data.idLineHeight = args['id1-lh'] or '1.25em'
data.idColor = args['id1-fc'] or data.infoColor
data.idPadding = args['id1-p'] or '0 1px 0 0'
data.idOtherParams = args['id1-op']
-- Get id2 values.
data.showId2 = true
data.id2 = args.logo or args[5] or args.id2 or 'id2'
data.id2Width = checkNumAndAddSuffix(args['id2-w'], 45, 'px')
data.id2Height = data.idHeight
data.id2BackgroundColor = args[7] or args['id2-c'] or args[1] or '#dddddd'
data.id2TextAlign = 'center'
data.id2FontSize = checkNumAndAddSuffix(args['id2-s'], 14, 'pt')
data.id2LineHeight = args['id2-lh'] or '1.25em'
data.id2Color = args['id2-fc'] or data.infoColor
data.id2Padding = args['id2-p'] or '0 0 0 1px'
data.id2OtherParams = args['id2-op']
return data
end
p['_userbox-r'] = function (args)
-- Does argument processing for {{userbox-r}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args[1] or args['border-c'] or args['id-c'] or '#999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee'
-- Get id values.
data.showId = false -- We only show id2 in userbox-r.
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-align'] or args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt')
data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em'
data.infoColor = args['info-color'] or args['info-fc'] or 'black'
data.infoOtherParams = args['info-other-param'] or args['info-op']
-- Get id2 values.
data.showId2 = true
data.id2 = args.logo or args[3] or args.id or 'id'
data.id2Width = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px')
data.id2Height = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.id2BackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd'
data.id2TextAlign = args['id-a'] or 'center'
data.id2FontSize = checkNumAndAddSuffix(args['logo-size'] or args[5] or args['id-s'], 14, 'pt')
data.id2Color = args['logo-color'] or args['id-fc'] or data.infoColor
data.id2Padding = args['logo-padding'] or args['id-p'] or '0 0 0 1px'
data.id2LineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em'
data.id2OtherParams = args['logo-other-param'] or args['id-op']
return data
end
function p.render(data)
-- Renders the userbox html using the content of the data table.
-- Render the div tag html.
local root = mw.html.create('div')
root
:css('float', data.float)
:css('border', (data.borderWidth or '') .. ' solid ' .. (data.borderColor or ''))
:css('margin', '1px')
:css('width', data.width)
:addClass('wikipediauserbox')
:addClass(data.bodyClass)
-- Render the table tag html.
local tableroot = root:tag('table')
tableroot
:css('border-collapse', 'collapse')
:css('width', data.width)
:css('margin-bottom', '0')
:css('margin-top', '0')
:css('background', data.backgroundColor)
-- Render the id html.
local tablerow = tableroot:tag('tr')
if data.showId then
tablerow:tag('th')
:css('border', '0')
:css('width', data.idWidth)
:css('height', data.idHeight)
:css('background', data.idBackgroundColor)
:css('text-align', data.idTextAlign)
:css('font-size', data.idFontSize)
:css('color', data.idColor)
:css('padding', data.idPadding)
:css('line-height', data.idLineHeight)
:css('vertical-align', 'middle')
:cssText(data.idOtherParams)
:addClass(data.idClass)
:wikitext(data.id)
end
-- Render the info html.
tablerow:tag('td')
:css('border', '0')
:css('text-align', data.infoTextAlign)
:css('font-size', data.infoFontSize)
:css('padding', data.infoPadding)
:css('height', data.infoHeight)
:css('line-height', data.infoLineHeight)
:css('color', data.infoColor)
:css('vertical-align', 'middle')
:cssText(data.infoOtherParams)
:addClass(data.infoClass)
:wikitext(data.info)
-- Render the second id html.
if data.showId2 then
tablerow:tag('th')
:css('border', '0')
:css('width', data.id2Width)
:css('height', data.id2Height)
:css('background', data.id2BackgroundColor)
:css('text-align', data.id2TextAlign)
:css('font-size', data.id2FontSize)
:css('color', data.id2Color)
:css('padding', data.id2Padding)
:css('line-height', data.id2LineHeight)
:css('vertical-align', 'middle')
:cssText(data.id2OtherParams)
:wikitext(data.id2)
end
local title = mw.title.getCurrentTitle()
if (title.namespace == 2) and not title.text:match("/") then
return tostring(root) -- regular user page
elseif title.namespace == 14 then
return tostring(root) -- category
elseif title.isTalkPage then
return tostring(root) -- talk page
end
local function has_text(wikitext)
local function get_alt(text)
return text:match("|alt=([^|]*)") or ""
end
wikitext = wikitext:gsub("]]", "|]]")
wikitext = wikitext:gsub("%[%[%s*[Mm][Ee][Dd][Ii][Aa]%s*:[^|]-(|.-)]]", get_alt)
wikitext = wikitext:gsub("%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:[^|]-(|.-)]]", get_alt)
wikitext = wikitext:gsub("%[%[%s*[Ff][Ii][Ll][Ee]%s*:[^|]-(|.-)]]", get_alt)
return mw.text.trim(wikitext) ~= ""
end
return tostring(root)
end
function p.categories(args, page)
-- Gets categories
-- The page parameter makes the function act as though the module was being called from that page.
-- It is included for testing purposes.
local cats = {}
cats[#cats + 1] = args.usercategory
cats[#cats + 1] = args.usercategory2
cats[#cats + 1] = args.usercategory3
if #cats > 0 and not require("Module:Yesno")(args.nocat) then
-- Get the title object
local title
if page then
title = mw.title.new(page)
else
title = mw.title.getCurrentTitle()
end
-- Build category handler arguments.
local chargs = {}
chargs.page = page
chargs.main = '[[Category:Pages with misplaced templates]]'
if title.namespace == 2 then
-- User namespace.
local user = ''
for i, cat in ipairs(cats) do
user = user .. makeCat(cat)
end
return user
elseif title.namespace == 10 then
-- Template namespace.
local basepage = title.baseText
local template = ''
for i, cat in ipairs(cats) do
template = template .. makeCat(cat, ' ' .. basepage)
end
return template
end
end
end
return p
aac333efff739f0243d8ffced6f4296cffb8d7e9
Template:Userbox/doc
10
109
212
211
2024-02-01T19:43:31Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
This template can be used to quickly create a [[w:Wikipedia:Userboxes|userbox]] for display on a user's [[Wikipedia:User pages|user page]] without having to know HTML or Wikitable syntax.
== Usage ==
<!-- Abstract usage of the template, one variable per row. -->
<pre style="overflow: auto">
{{userbox
| bodyclass = <!--Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.-->
| border-c = <!--border color (default=id-c or #999999)-->
| border-s = <!--border width in pixels (default=1)-->
| float = <!--left|right|none (default=left)-->
| id = <!--id image or text (image size should normally not exceed 90x45px)-->
| id-a = <!--id horizontal alignment left/center/right/justify (default=center)-->
| id-c = <!--id background color (default=#DDDDDD)-->
| id-fc = <!--id font color (default=info-fc or black)-->
| id-h = <!--id box height in pixels (default=45)-->
| id-lh = <!--id line height (default=1.25em)-->
| id-op = <!--id other CSS parameters-->
| id-p = <!--id cell padding (default=0 1px 0 0)-->
| id-s = <!--id text size in points (default=14)-->
| id-w = <!--id box width in pixels (default=45)-->
| info-class = <!--Adds an HTML class attribute to the "info" HTML table-row, to allow for styling, emission of microformats, etc.-->
| info = <!--info text or image-->
| info-a = <!--info horizontal alignment left/center/right/justify (default=left)-->
| info-c = <!--info background color (default=#EEEEEE)-->
| info-fc = <!--info font color (default=black)-->
| info-lh = <!--info line height (default=1.25em)-->
| info-op = <!--info other CSS parameters-->
| info-p = <!--info padding (default=0 4px 0 4px)-->
| info-s = <!--info text size in points (default=8)-->
| nocat = <!--block page category declarations; see [[WP:NOCAT]] (default=false)-->
| usercategory = <!--user category (optional, unlinked and without the "Category:" part)-->
| usercategory2 = <!--user category (optional)-->
| usercategory3 = <!--user category (optional)-->
| usercategory4 = <!--user category (optional)-->
| usercategory5 = <!--user category (optional)-->
}}
</pre>
* All parameters are optional.
* Images should normally be scaled to x45px or less.
<!-- Explain what this template's parameters do -- if no params, delete the definition. -->
Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here:
<pre>
{{userbox
| border-c =
| id =
| id-c =
| id-fc =
| id-s =
| info =
| info-c =
| info-fc =
| info-lh =
| info-s =
}}</pre>
== Examples ==
{|
! style="width: 300px;" | Code
! Result
|-
| <pre>{{userbox
| border-c = #aaffaa
| border-s = 2
| id = foo
| id-c = #ffffee
| id-s = 20
| info = ''foo bar''
| info-c = #ffeeff
| info-s = 12
}}</pre> || {{userbox|id=foo|id-s=20|id-c=#ffffee|info=''foo bar''|info-c=#ffeeff|info-s=12|border-c=#aaffaa|border-s=2}}
|-
| colspan="2"| Below example shows the default appearance of a userbox, which is (much) higher than the 45px.<br>Compare the height of the one below with the above userbox.
|-
| <pre>{{userbox
| border-c = #aaffaa
| border-s = 2
| id = foo logo
| id-c = #ffffee
| info = ''We are trying to see
default distance in between text
lines, see the distance in
between cell content and its border,
and also see total height.''
| info-c = #ffeeff
}}</pre> || {{userbox|id=foo logo|id-c=#ffffee|info=''We are trying to see default distance in between text lines, see the distance in between cell content and its border, and also see total height.''|info-c=#ffeeff|border-c=#aaffaa|border-s=2}}
|-
| colspan="2"| Below example shows how we can change that userbox and further specify parameters to bring down<br>the overall height of the userbox to the recommended height of 45px, even with four text lines.<br>Cell padding parameter "''info-p''" can also be set at "''1pt 1pt 1pt 2pt''", or "''1pt 2pt''" for better appearance,<br>when there are 4 text lines.
|-
| <pre>{{userbox
| border-c = #aaffaa
| border-s = 1
| id = foo logo
| id-c = #ffffee
| id-lh = 1.1em
| id-s = 14
| info = ''We have specified values
to lessen the distance between
text lines and padding space between
cell content and its border.''
| info-c = #ffeeff
| info-lh = 1.05em
| info-p = 1pt
| info-s = 8
}}</pre> || {{userbox|id=foo logo|id-s=14|id-lh=1.1em|id-c=#ffffee|info=''We have specified values to lessen the distance between text lines and padding space between cell content and its border.''|info-c=#ffeeff|info-s=8|info-p=1pt|info-lh=1.05em|border-c=#aaffaa|border-s=1}}
|-
| colspan="2"| Below example is for advanced users, showing how we can specify other [[w:Cascading Style Sheets|CSS]] properties,for example, "''font-family''",<br>to change the font or "''text-decoration''" to add lines around the text. Below, on the right side are two userboxes:<br>the top one is displayed without either parameters; and the bottom userbox is displayed by using the below code,<br>with the help of the "''info-op''" field.
|-
| <pre>{{userbox
| border-c = #afa
| border-s = 2
| id = foo logo
| id-c = #ffe
| id-lh = 1.1em
| id-s = 14
| info = foo bar
| info-c = #fef
| info-op = font-family: 'Courier New', monospace; text-decoration: wavy overline green;
| info-s = 14
}}</pre> || colspan="2"| {{Userbox|id=foo logo|id-s=14|id-lh=1.1em|id-c=#ffe|info=foo bar|info-c=#fef|info-s=14|border-c=#afa|border-s=2}} <br style="clear:both"> <br /> {{Userbox|id=foo logo|id-s=14|id-lh=1.1em|id-c=#ffe|info=foo bar|info-c=#fef|info-s=14|info-op=font-family: 'Courier New', monospace; text-decoration: wavy overline green;|border-c=#afa|border-s=2}}
|}
==Microformats==
; bodyclass : This parameter is inserted into the "class" attribute for the userbox as a whole.
; info-class : This parameter is inserted into the "class" attribute for the info component.
This template supports the addition of [[w:microformat|microformat]] information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a userbox as containing [[w:hCard|hCard]] information about a person, for example, add the following parameter:
<pre>
| bodyclass = vcard
</pre>
''or''
<pre>
| info-class = vcard
</pre>
''then'' (for example):
<pre><nowiki>
| title = …the books of <span class="fn">[[Iain Banks]]</span>
</nowiki></pre>
...and so forth.
See [[w:Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia.
== Template Data ==
<TemplateData>{
"description": "This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.",
"params": {
"bodyclass": {
"label": "bodyclass",
"description": "Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.",
"type": "string",
"required": false
},
"border-c": {
"label": "border-c",
"description": "border color",
"type": "string",
"default": "#999",
"required": false
},
"border-s": {
"label": "border-s",
"description": "border width in pixels",
"type": "string",
"default": "1",
"required": false
},
"float": {
"label": "float",
"description": "left|right|none",
"type": "string",
"default": "left",
"required": false
},
"id": {
"label": "id",
"description": "id image or text",
"type": "string",
"required": false
},
"id-a": {
"label": "id-a",
"description": "id horizontal alignment left/center/right/justify",
"type": "string",
"default": "center",
"required": false
},
"id-c": {
"label": "id-c",
"description": "id background color",
"type": "string",
"default": "#d0d0d0",
"required": false
},
"id-fc": {
"label": "id-fc",
"description": "id font color",
"type": "string",
"default": "black",
"required": false
},
"id-h": {
"label": "id-h",
"description": "id box height in pixels",
"type": "string",
"default": "45",
"required": false
},
"id-lh": {
"label": "id-lh",
"description": "id line height",
"type": "string",
"default": "1.25em",
"required": false
},
"id-op": {
"label": "id-op",
"description": "id other CSS parameters",
"type": "string",
"required": false
},
"id-p": {
"label": "id-p",
"description": "id cell padding",
"type": "string",
"default": "0 1px 0 0",
"required": false
},
"id-s": {
"label": "id-s",
"description": "id text size in points",
"type": "string",
"default": "14",
"required": false
},
"id-w": {
"label": "id-w",
"description": "id box width in pixels",
"type": "string",
"default": "45",
"required": false
},
"info-class": {
"label": "info-class",
"description": "Adds an HTML class attribute to the \"info\" HTML table-row, to allow for styling, emission of microformats, etc.",
"type": "string",
"required": false
},
"info": {
"label": "info",
"description": "info text or image",
"type": "string",
"required": false
},
"info-a": {
"label": "info-a",
"description": "info horizontal alignment left/center/right/justify",
"type": "string",
"default": "left",
"required": false
},
"info-c": {
"label": "info-c",
"description": "info background color",
"type": "string",
"default": "#e0e0e0",
"required": false
},
"info-fc": {
"label": "info-fc",
"description": "info font color",
"type": "string",
"default": "black",
"required": false
},
"info-lh": {
"label": "info-lh",
"description": "info line height",
"type": "string",
"default": "1.25em",
"required": false
},
"info-op": {
"label": "info-op",
"description": "info other CSS parameters",
"type": "string",
"required": false
},
"info-p": {
"label": "info-p",
"description": "info padding",
"type": "string",
"default": "0 4px 0 4px",
"required": false
},
"info-s": {
"label": "info-s",
"description": "info text size in points",
"type": "string",
"default": "8",
"required": false
},
"nocat": {
"label": "nocat",
"description": "block page category declarations (see WP:NOCAT)",
"type": "string",
"default": "false",
"required": false
},
"usercategory": {
"label": "usercategory",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory2": {
"label": "usercategory2",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory3": {
"label": "usercategory3",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory4": {
"label": "usercategory4",
"description": "user category (optional)",
"type": "string",
"required": false
},
"usercategory5": {
"label": "usercategory5",
"description": "user category (optional)",
"type": "string",
"required": false
}
},
"format": "block"
}</TemplateData>
<includeonly>[[Category:Templates]]</includeonly>
dd41ebb3f967b6cdfb1f5802c2bdd71bc115e74a
Template:Utc/doc
10
110
214
213
2024-02-01T19:43:31Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
{{tl|{{PAGENAME}}}} takes the current [[w:UTC|UTC]] time from the server, and applies an optional time offset in hours (or hours and minutes). It returns the computed local time in 24-hour format (''hh:mm'').
; Syntax<nowiki>:</nowiki>
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>''[hours]''<nowiki>|</nowiki>''[minutes]''<nowiki>}}</nowiki></code>
* The ''hours'' parameter (optional, default 0) is normally negative for America and West Pacific, it is null or positive in Europe, Africa, Asia and East Pacific.
* The ''minutes'' parameter (optional, default 0) is null for most timezones, but 30 minutes occur in some places, sometimes because of daylight. Use negative values for western timezones that need it.
* Non integer are accepted for both parameters, but this will be typically used only for ''hours'' offsets from UTC.
; Examples<nowiki>:</nowiki>
: <code><nowiki>{{</nowiki>Utc<nowiki>}}</nowiki></code> = "{{Utc}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>-4<nowiki>}}</nowiki></code> = "{{Utc|-4}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>2<nowiki>}}</nowiki></code> = "{{Utc|2}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>6.5<nowiki>}}</nowiki></code> = "{{Utc|6.5}}".
: <code><nowiki>{{</nowiki>Utc<nowiki>|</nowiki>6<nowiki>|</nowiki>30<nowiki>}}</nowiki></code> = "{{Utc|6|30}}".
<includeonly>[[Category:Templates]]</includeonly>
f3acbbecf14857a9af608e27a0a52aea42ed9999
Template:Welcome/doc
10
111
216
215
2024-02-01T19:43:32Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{documentation subpage}}
Simply add <code><nowiki>{{subst:Welcome}}</nowiki></code>, ''without'' an added section header and your signature (<code><nowiki>~~~~</nowiki></code>), to any user's talk page once they have made non-bot-like contributions to {{SITENAME}}.
=== Parameters ===
* {{para|header|no}} - If specified, don't automatically add a header to the message.
* {{para|hello|foo}} - Replace the first paragraph ("Hello, <username>, and welcome to {{SITENAME}}!")
* {{para|thanks|foo}} - Replace the "thanks" at the end.
* {{para|sig|no}} - If specified, don't automatically sign header to the message.
<includeonly>
[[Category:Templates]]
</includeonly>
37f6ea1e88d198122e45216d2a58a7363fd1f221
Template:Para/doc
10
112
218
217
2024-02-01T19:43:32Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
== Usage ==
This template is for giving examples of template parameter source code (useful in template documentation and talk page discussions of template code).
It must have at least one or two parameters itself. The first parameter is the name of the example parameter to display (this may be ''empty'', but it must be ''present''). The second (optional) parameter is a value for the first example parameter; or, if the first parameter is empty, the second illustrates an example [[mw:Help:Templates#Anonymous parameters|unnamed parameter]] (which in some cases may serve as a pre-defined parameter that takes no <code>{{!}}{{=}}value</code> after it, e.g. the {{para||section}} in {{tlx|Refimprove|section|SISTER=w:}}).
=== Examples ===
{| class="wikitable"
! Code
! Result
! Notes
|-
| {{tlx|para|name}}
| {{para|name}}
|
|-
| {{tlx|para|title|The Oxford English Dictionary}}
| {{para|title|The Oxford English Dictionary}}
|
|-
| {{tlx|para|2=<span style="font-size:1pt;"> </span>|3=section}}
| {{para||section}}
| For [[mw:Help:Templates#Parameters|unnamed parameters]]; note empty first parameter in the code
|-
| <code><nowiki>{{para|parameter|value}}</nowiki></code>
| {{para|parameter|value}}
|
|}
== Parameters ==
* {{para|1}} or first unnamed parameter – the parameter name. Give this parameter as explicitly blank and just fill in parameter 2 when you want to show an [[mw:Help:Templates#Anonymous parameters|unnamed parameter]] (which, depending on the context, may serve as a valueless parameter name); e.g., {{tlx||para||section}} → {{para||section}}
* {{para|2}} or second unnamed parameter – the value name. When the first parameter is given but is blank, the second represents an unnamed parameter's value (or a valueless parameter name), as illustrated above.
* {{para|plain|y}} (or any other value besides y) – removes the faint border and light-grey background, which may be useful in various situations. The border and text color are set to inherit, to use the colors of the surrounding text. This parameter cooperates with the two below, in that if either are used, the text will be colorized while the border and background will still be removed.
* {{para|style}} – to apply arbitrary CSS style, for some specialized contextual purpose. Example: {{para|style|background-color: Yellow;}}. Any color, background-color, or border specified here will override those provided by any of the above parameters, regardless of the order in which the parameters are given in the template. As this template uses a span element, only CSS that can apply to inline elements (not block elements) will work. Like the above parameters, it applies to the entire output.
** If you want to only style the parameter name and/or the value, just do so directly;<br />e.g.: <code><nowiki>{{para|page|'''single''' page number}}</nowiki></code>, <code><nowiki>{{para|page'''''<u>s</u>'''''|page '''range''', or '''multiple''' individual pages, or both}}</nowiki></code><br />gives: {{para|page|'''single''' page number}}, {{para|page'''''<u>s</u>'''''|page '''range''', or '''multiple''' individual pages, or both}}
==TemplateData==
<templatedata>
{
"params": {
"1": {
"label": "Parameter name",
"description": "The parameter name. Give this parameter as explicitly blank and just fill in parameter 2 when you want to show an unnamed parameter",
"type": "string",
"suggested": true
},
"2": {
"label": "Value name",
"description": "The value name. When the first parameter is given but is blank, the second represents an unnamed parameter's value (or a valueless parameter name).",
"type": "string",
"suggested": true
},
"plain": {
"description": "Removes the faint border and light-grey background",
"type": "boolean"
},
"style": {
"description": "Apply arbitrary CSS style, for some specialized contextual purpose.",
"example": "background-color: Yellow;",
"type": "content"
}
},
"description": "Gives examples of template parameter source code"
}
</templatedata>
<includeonly>
[[Category:Templates]]
</includeonly>
830caf3901b5ec26c55d028345f3d3116409a3b5
Template:Description missing/doc
10
113
220
219
2024-02-01T19:43:33Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
Place this template on any ''media file'' which lacks description, author information, date, or any other identification data. Any media bearing this template are automatically added to [[:Category:Images lacking a description]].
To add a file description, use [[Template:Information]].
=== Usage ===
;Syntax: '''{{ Description missing''' ['''|''' ''What's missing''] '''}}'''
;Notation
#Character written in bold must be typed as shown
#Words written in italic must be replaced with appropriate letters
#Parameters enclosed in “[” and “]” are optional
;Parameters
{| class = "wikitable"
! Parameter
! Description
|-
| ''What's missing''
| Optional parameter. Specify what kind of information is missing. If you omit this parameter, the template will assume that "description" is missing. Possible values include: "author information", "date", etc.
|}
; Examples
:<code><nowiki>{{Description missing}}</nowiki></code>
:<code><nowiki>{{Description missing|author information}}</nowiki></code>
:<code><nowiki>{{Description missing|date}}</nowiki></code>
Produces:
{{Description missing}}
{{Description missing|author information}}
{{Description missing|date}}
<includeonly>
[[Category:Templates]]
</includeonly>
fa3fd16eea9b10d2a1cdac2036ba5a905d1a1d2a
Module:Message box
828
114
222
221
2024-02-01T19:43:33Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('Module:No globals')
local getArgs
local yesno = require('Module:Yesno')
local templatestyles = 'Module:Message box/styles.css'
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {user = 'tmbox', talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if args.demospace and args.demospace ~= '' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
else
-- default to ombox
obj.cfg = cfg.ombox
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.hasCategories = true
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
table.insert(self.classes, class)
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
end
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
end
self.info = args.info
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.invalidTypeError then
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
end
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Create the box table.
local boxTable = root:tag('table')
boxTable:attr('id', self.id or nil)
for i, class in ipairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
local function templatestyles(frame, src)
return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = templatestyles} }
.. 'CONFIG_MODULE'
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
be00cd389f9f2afcd361e5d5e33622839555cbd9
Module:Message box/configuration
828
115
224
223
2024-02-01T19:43:33Z
Bonclide
2
1 revision imported
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ambox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ambox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ambox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
classes = {'metadata', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = 'Article message templates with missing parameters',
templateErrorParamsToCheck = {'issue', 'fix'},
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'cmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'cmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information icon4.svg'
},
system = {
class = 'fmbox-system',
image = 'Information icon4.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'imbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'imbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox license.png' -- @todo We need an SVG version of this
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ombox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ombox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'tmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'tmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
c6bd9191861b23e474e12b19c694335c4bc3af5f
Module:No globals
828
116
226
225
2024-02-01T19:43:34Z
Bonclide
2
1 revision imported
Scribunto
text/plain
local mt = getmetatable(_G) or {}
function mt.__index (t, k)
if k ~= 'arg' then
error('Tried to read nil global ' .. tostring(k), 2)
end
return nil
end
function mt.__newindex(t, k, v)
if k ~= 'arg' then
error('Tried to write global ' .. tostring(k), 2)
end
rawset(t, k, v)
end
setmetatable(_G, mt)
8ce3969f7d53b08bd00dabe4cc9780bc6afd412a
Template:Uses TemplateStyles/doc
10
117
228
227
2024-02-01T19:43:34Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go at the bottom of this page, and interwikis go on Wikidata. -->
This template is used to show that templates have been converted to use [[mw:Extension:TemplateStyles|TemplateStyles]]. It is placed at the top of the template's /doc page.
== Usage ==
; Basic : {{tlx|Uses TemplateStyles|''TemplateStyles page name''}}
; All parameters : {{tlx|Uses TemplateStyles|''TemplateStyles page 1''|''TemplateStyles page 2''|''TemplateStyles page 3''|...|category{{=}}''custom category''|nocat{{=}}''true''}}
The first TemplateStyles page name is required.
===TemplateStyles sandboxes===
Note that if a sandbox version of the TemplateStyle exists, it will also be linked. This is only for sandbox versions. The subpage name of the sandbox version should be the same, but as a subpage of the templates sandbox. For example, if the TemplateStyles page name is <code>Template:Foo/styles.css</code>, then the sandbox version should be <code>Template:Foo/sandbox/styles.css</code>
== Examples ==
===One style page===
{{tlx|Uses TemplateStyles|Template:Arrowlist/styles.css}}
{{Uses TemplateStyles|Template:Arrowlist/styles.css|nocat=true}}
{{clear}}
===Multiple style pages===
{{tlx|Uses TemplateStyles|Template:Arrowlist/styles.css|Template:Routemap/styles.css}}
{{Uses TemplateStyles|Template:Arrowlist/styles.css|Template:Routemap/styles.css|nocat=true}}
{{clear}}
===Sandbox version of style page exists===
{{tlx|Uses TemplateStyles|Template:Uses TemplateStyles/example.css}}
{{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}}
{{clear}}
===No style pages specified===
{{tlx|Uses TemplateStyles}}
{{Uses TemplateStyles|nocat=true}}
{{clear}}
== TemplateData ==
<templatedata>
{
"description": "Used to show that templates have been converted to use TemplateStyles.",
"format": "inline",
"params": {
"1": {
"label": "Stylesheet 1",
"description": "Name of the main stylesheet used in the template or module. Use multiple parameters to specify multiple stylesheets.",
"required": true,
"type": "wiki-page-name"
},
"2": {
"label": "Stylesheet 2",
"description": "Name of the second stylesheet.",
"type": "wiki-page-name"
},
"3": {
"label": "Stylesheet 3",
"description": "Name of the third stylesheet.",
"type": "wiki-page-name"
},
"4": {
"label": "Stylesheet 4",
"description": "Name of the fourth stylesheet.",
"type": "wiki-page-name"
},
"5": {
"label": "Stylesheet 5",
"description": "Name of the fifth stylesheet.",
"type": "wiki-page-name"
},
"6": {
"label": "Stylesheet 6",
"description": "Name of the sixth stylesheet.",
"type": "wiki-page-name"
},
"7": {
"label": "Stylesheet 7",
"description": "Name of the seventh stylesheet.",
"type": "wiki-page-name"
},
"8": {
"label": "Stylesheet 8",
"description": "Name of the eighth stylesheet.",
"type": "wiki-page-name"
},
"9": {
"label": "Stylesheet 9",
"description": "Name of the ninth stylesheet.",
"type": "wiki-page-name"
},
"10": {
"label": "Stylesheet 10",
"description": "Name of the tenth stylesheet.",
"type": "wiki-page-name"
}
}
}
</templatedata>
<includeonly>
[[Category:Templates]]
</includeonly>
c86681b5a4f99bb6940c1ab54645e0f43131bb4e
Module:Uses TemplateStyles
828
118
230
229
2024-02-01T19:43:34Z
Bonclide
2
1 revision imported
Scribunto
text/plain
-- This module implements the {{Uses TemplateStyles}} template.
local mMessageBox = require('Module:Message box')
local p = {}
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args)
return p.renderBox(args)
end
function p.renderBox(tStyles)
local boxArgs = {}
if #tStyles < 1 then
boxArgs.text = '<strong class="error">Error: no TemplateStyles specified</strong>'
else
local tStylesLinks = {}
for i, ts in ipairs(tStyles) do
local sandboxLink = nil
local tsTitle = mw.title.new(ts)
if tsTitle then
local tsSandboxTitle = mw.title.new(string.format('%s:%s/sandbox/%s', tsTitle.nsText, tsTitle.baseText, tsTitle.subpageText))
if tsSandboxTitle and tsSandboxTitle.exists then
sandboxLink = string.format(' ([[:%s|sandbox]])', tsSandboxTitle.prefixedText)
end
end
tStylesLinks[i] = string.format('[[:%s]]%s', ts, sandboxLink or '')
end
local tStylesList = mw.text.listToText(tStylesLinks)
boxArgs.text = 'This ' ..
(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..
' uses [[mw:Extension:TemplateStyles|TemplateStyles]]:\n' .. tStylesList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Farm-Fresh css add.svg|32px|alt=CSS]]'
return mMessageBox.main('mbox', boxArgs)
end
return p
3c7364ddaba9beb17a73b0f5256cd7fc3b3051f4
Template:Header/doc
10
119
232
231
2024-02-01T19:43:35Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
<pre>
{{header
| title =
| shortcut =
| notes =
| topbarhex =
| bodyhex =
| titlecolor =
| bodycolor =
}}
</pre>
===Relative links===
On pages with many subpages, using [[m:Help:Link#Subpage_feature|relative links]] is highly recommended. This shortens the code and ensures that pages remain linked together, even if the overall system is moved or reorganised. The three formats are <nowiki>[[/subpage]]</nowiki> (subpage), <nowiki>[[../]]</nowiki> (parent), and <nowiki>[[../sibling]]</nowiki> (sibling); see the example usage below. Note that <nowiki>[[../]]</nowiki> will expand to the title of the parent page, which is ideal if the page is renamed at a later time.
==See also==
{{#lst:Template:Template list|header-templates}}
5765ffdddc2682eb2227083ebcc24a126128ac5d
Template:See also/doc
10
120
234
233
2024-02-01T19:43:35Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{documentation subpage}}
This template is used to create [[w:WP:Hatnotes|hatnotes]] to point to a small number of other related titles. It looks like this:
{{See also|Article}}
Refer to the examples below to see how the template handles link targets containing section links and commas.
==Usage==
; Basic usage:
{{See also|''page1''|''page2''|''page3''|...}}
; All parameters:
{{See also|''page1''|''page2''|''page3''| ...
|label 1 = ''label 1''|label 2 = ''label2''|label 3 = ''label3''| ...
|l1 = ''label1''|l2 = ''label2''|l3 = ''label3''| ...
|selfref = ''yes''|category = ''no''}}
==Parameters==
This template accepts the following parameters:
* <code>1</code>, <code>2</code>, <code>3</code>, ... – the pages to link to. At least one page name is required. Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
* <code>label 1</code>, <code>label 2</code>, <code>label 3</code>, ...; or <code>l1</code>, <code>l2</code>, <code>l3</code>, ...; optional labels for each of the pages to link to.
* <code>selfref</code> – if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references to Wikipedia. See [[Template:Selfref]] for more information.
* <code>category</code> – if set to "no", "n", "false", or "0", suppresses the error tracking category ([[:Category:Hatnote templates with errors]]). This only has an effect if the first positional parameter (the page to link to) is omitted.
== Examples ==
* <code><nowiki>{{See also|Article}}</nowiki></code> → {{See also|Article}}
* <code><nowiki>{{See also|Article#Section}}</nowiki></code> → {{See also|Article#Section}}
* <code><nowiki>{{See also|Article#Section|label 1=Custom section label}}</nowiki></code> → {{See also|Article#Section|label 1=Custom section label}}
* <code><nowiki>{{See also|Article1|Article2|Article3}}</nowiki></code> → {{See also|Article1|Article2|Article3}}
* <code><nowiki>{{See also|Article1|Article,2|Article3}}</nowiki></code> → {{See also|Article1|Article,2|Article3}}
* <code><nowiki>{{See also|Article1|l1=Custom label 1|Article2|l2=Custom label 2}}</nowiki></code> → {{See also|Article1|l1=Custom label 1|Article2|l2=Custom label 2}}
* <code><nowiki>{{See also|Veni, vidi, vici|Julius Caesar}}</nowiki></code> → {{See also|Veni, vidi, vici|Julius Caesar}}
* <code><nowiki>{{See also|Veni, vidi, vici|Julius Caesar#Civil war}}</nowiki></code> → {{See also|Veni, vidi, vici|Julius Caesar#Civil war}}
* <code><nowiki>{{See also|Julius Caesar#Civil war|Veni, vidi, vici}}</nowiki></code> → {{See also|Julius Caesar#Civil war|Veni, vidi, vici}}
* <code><nowiki>{{See also|Julius Caesar#Civil war|Crossing the Rubicon}}</nowiki></code> → {{See also|Julius Caesar#Civil war|Crossing the Rubicon}}
==Errors==
If no page names are supplied, the template outputs the following message with the (help) wikilink pointing to the "Errors" section of this page:
*{{See also|category=no}}
If you see this error message, it is for one of three reasons:
# No parameters were specified (the template code was <code><nowiki>{{See also}}</nowiki></code> with no pipe character nor page to link to). Please use <code><nowiki>{{See also|</nowiki>''page''<nowiki>}}</nowiki></code> instead.
# Some parameters were specified, but no page names were included. For example, the template text <code><nowiki>{{See also|selfref=yes}}</nowiki></code> will produce this error. Please use (for example) <code><nowiki>{{See also|</nowiki>''page''<nowiki>|selfref=yes}}</nowiki></code> instead.
# A page name was specified, but it contains an equals sign ("="). The equals sign has a special meaning in template code, and because of this it cannot be used in template parameters that do not specify a parameter name. For example, the template code <code><nowiki>{{See also|1+1=2|2+2=4}}</nowiki></code> will produce this error. To work around this, you can specify the parameter name explicitly by using <code>1=</code>, <code>2</code>, etc., before the page name, like this: <code><nowiki>{{See also|1=1+1=2|2=2+2=4}}</nowiki></code>.
If you see this error message and are unsure of what to do, please post a message on [[WP:HD|the help desk (WP:HD)]], and someone should be able to help you.
To see a list of wikilinks to articles that contain this error message, see the [[Wikipedia:Maintenance|maintenance category]]: [[:Category:Hatnote templates with errors]].
==TemplateData==
<templatedata>
{
"description": "This template creates a hatnote to point to a small number of related pages. It is placed at the top of a section, directly underneath the section heading.",
"params": {
"1": {
"label": "Page 1",
"description": "The name of the first page that you want to link to.",
"type": "wiki-page-name",
"required": true,
"example": "Article name"
},
"2": {
"label": "Page 2",
"description": "The name of the second page that you want to link to.",
"type": "wiki-page-name",
"required": false
},
"3": {
"label": "Page 3",
"description": "The name of the third page that you want to link to. More pages can be added using the parameters \"4\", \"5\", \"6\", etc.",
"type": "wiki-page-name",
"required": false
},
"label 1": {
"label": "Label 1",
"type": "string",
"description": "What the first linked article is to be displayed as. ",
"aliases": [
"l1"
]
},
"label 2": {
"label": "Label 2",
"type": "string",
"description": "What the second linked article is to be displayed as.",
"aliases": [
"l2"
]
},
"label 3": {
"aliases": [
"l3"
],
"type": "string",
"label": "Label 3",
"description": "What the third linked article is to be displayed as. Other labels can be added by using increasing numbers (starting with \"label 4\" or \"l4\" for page 4) as parameter names."
},
"selfref": {
"type": "boolean",
"label": "Self reference",
"description": "Set to \"yes\" if the template is a self-reference to Wikipedia that would not make sense on mirrors or forks of the Wikipedia site.",
"example": "yes",
"default": "no"
},
"category": {
"label": "Category",
"description": "Set to \"no\", \"n\", \"false\", or \"0\" to suppresses the error tracking category (Category:Hatnote templates with errors). This only has an effect if no page names are specified.",
"type": "boolean",
"default": "yes",
"example": "no"
}
},
"format": "inline"
}
</templatedata>
==See also==
<includeonly>
[[Category:Templates]]
</includeonly>
02774f4e6b8e9592547778c4ff1d268700853631
Template:Pseudoheading/doc
10
121
236
235
2024-02-01T19:43:36Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
This template is used to create examples of section heading wiki markup in help and similar pages. Fake headings do not appear in the table of contents. They are styled to appear the same as the default heading styles in the Vector skin, and will not be influenced by custom CSS or skins.
==Parameters==
* {{para|level}} or {{para|sub}} is the level number: valid values are 1 through 6. The default is 2 (equivalent of a <code><nowiki>== Main heading ==</nowiki></code> (level 1 is equivalent to page title).
* An unnamed parameter (which can also be specified as {{para|1}}) is used for the section title.
==Example==
<pre>
{{Pseudoheading|sub=1|Heading 1}}
{{Pseudoheading|sub=2|Heading 2}}
{{Pseudoheading|sub=3|Heading 3}}
{{Pseudoheading|sub=4|Heading 4}}
{{Pseudoheading|sub=5|Heading 5}}
{{Pseudoheading|sub=6|Heading 6}}
</pre>
{{Pseudoheading|sub=1|Heading 1}}
{{Pseudoheading|sub=2|Heading 2}}
{{Pseudoheading|sub=3|Heading 3}}
{{Pseudoheading|sub=4|Heading 4}}
{{Pseudoheading|sub=5|Heading 5}}
{{Pseudoheading|sub=6|Heading 6}}
<includeonly>
[[Category:templates]]
</includeonly>
ffa2c7843256f67edb39f33014a6fbd7fbb8a7ff
Template:Information/style.css
10
122
238
237
2024-02-01T19:43:36Z
Bonclide
2
1 revision imported
sanitized-css
text/css
.fileinfo-paramfield {
background: #ccf;
text-align: right;
padding-right: 0.4em;
width: 15%;
font-weight: bold;
}
/* [[Category:Template stylesheets]] */
396fcf8276bedcc9dad608bdbd9bf1be7f90424d
Template:Information/doc
10
123
240
239
2024-02-01T19:43:37Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
== Purpose ==
This template records and displays metadata for media files, such as photographs and diagrams. It includes a description of the file, its source, and its copyright status.
== Usage ==
<pre>
{{Information
| description =
| source =
| date =
| author =
| other_versions =
| additional_information =
}}
</pre>
== Parameters ==
;description: Describe of the content, (historical) background, and in the case of scientific data, a brief scientific analysis of the media file.
;author: Author(s) of the image. If no individual person is known, use the name of the institution that owns, published or released the file.
;source: Explain where the image is acquired from. Please specify accurately. For instance:
#''Work of the uploader themself:'' Specify "Own work".
#''Acquired from a website:'' Specify the URL of the web page from which it is acquired. Optionally, include a direct link to the image. (Never include a direct link alone.)
#''Scanned from a book or magazine:'' Specify the title, author, publisher, publication year, ISBN and page of the book or title, issue, volume, publication month and year, ISSN (if available) and page of the journal.
;date: Date of creation, or date of publication. Please avoid ambiguous dates like 02/03/04 which can refer to 2 March 2004, 3 February 2004, 4 March 2002 or 3 April 2002, depending on the geographical origin of the person who sees it.
;other versions: '''Optional'''. Links to other versions of this image. The links may be in form of a list of links or thumbnails of the other versions of the image.
;additional information: '''Optional'''. Contains other information about this image that doesn't fit somewhere else. For example, information that might be relevant to determining a file's proper copyright status (e.g. weblinks) might be provided this way.
== Example ==
Example for [[:File:Anders-Celsius-Head.jpg]]:
{{Information
| description = Part of an oil painting of Anders Celsius. Painting by Olof Arenius (1701 - 1766). The original painting is placed in the astronomical observatory of Uppsala University.
| source = Astronomical observatory of Uppsala University
* Source site: http://www.astro.uu.se/history/Celsius_eng.html
* Source URL: http://www.astro.uu.se/history/images/celsius3.jpg
| date = between 1701 - 1766
| author = Olof Arenius
| other_versions = [[:File:Anders-Celsius.jpeg]] (full image)
}}
==TemplateData==
<templatedata>
{
"params": {
"description": {
"required": true,
"label": "Description",
"aliases": [
"Description"
],
"type": "string",
"description": "Describe of the content, (historical) background, and in the case of scientific data, a brief scientific analysis of the media file."
},
"source": {
"required": true,
"label": "Source",
"aliases": [
"Source"
],
"type": "string",
"description": "Explain where the image is acquired from. Please specify accurately. (If it is the work of the uploader themself, use \"Own work\". If it was acquired from a website, specify the URL of the web page from which it is acquired. Optionally, include a direct link to the image. (Never include a direct link alone.) If it was scanned from a book or magazine, specify the title, author, publisher, publication year, ISBN and page of the book or title, issue, volume, publication month and year, ISSN (if available) and page of the journal."
},
"date": {
"required": false,
"label": "Date",
"aliases": [
"Date"
],
"type": "string",
"description": "Date of creation or date of publication. Please avoid ambiguous dates like 02/03/04 which can refer to 2 March 2004, 3 February 2004, 4 March 2002 or 3 April 2002, depending on the geographical origin of the person who sees it."
},
"author": {
"required": true,
"label": "Author",
"aliases": [
"Author"
],
"type": "string",
"description": "Author(s) of the image. If no individual person is known, use the name of the institution that owns, published or released the file."
},
"other_versions": {
"required": false,
"label": "Other versions",
"aliases": [
"Other_versions",
"other versions"
],
"type": "string",
"description": "Links to other versions of this image. The links may be in form of a list of links or thumbnails of the other versions of the image."
},
"additional_information": {
"required": false,
"label": "Additional information",
"aliases": [
"Additional_information",
"Additional information",
"additional information"
],
"type": "string",
"description": "Contains other information about this image that doesn't fit somewhere else."
}
},
"description": "This template is used to make a standardized table providing information about files, including a description, its copyright status, and its source.",
"format": "block"
}
</templatedata>
<includeonly>
[[Category:Templates]]
</includeonly>
fd59146b872645797c8fea34b8da44adf2623565
Module:String
828
124
242
241
2024-02-01T19:43:37Z
Bonclide
2
1 revision imported
Scribunto
text/plain
--[[
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
error_category: If an error occurs, specifies the name of a category to
include with the error message. The default category is
[Category:Errors reported by Module String].
no_category: If set to 'true' or 1, no category will be added if an error
is generated.
Unit tests for this module are available at Module:String/tests.
]]
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:String|len|target_string|}}
OR
{{#invoke:String|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} )
local s = new_args['s'] or ''
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:String|sub|target_string|start_index|end_index}}
OR
{{#invoke:String|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } )
local s = new_args['s'] or ''
local i = tonumber( new_args['i'] ) or 1
local j = tonumber( new_args['j'] ) or -1
local len = mw.ustring.len( s )
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1
end
if j < 0 then
j = len + j + 1
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' )
end
if j < i then
return str._error( 'String subset indices out of order' )
end
return mw.ustring.sub( s, i, j )
end
--[[
_match
This function returns a substring from the source string that matches a
specified pattern. It is exported for use in other modules
Usage:
strmatch = require("Module:String")._match
sresult = strmatch( s, pattern, start, match, plain, nomatch )
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
-- This sub-routine is exported for use in other modules
function str._match( s, pattern, start, match_index, plain_flag, nomatch )
if s == '' then
return str._error( 'Target string is empty' )
end
if pattern == '' then
return str._error( 'Pattern string is empty' )
end
start = tonumber(start) or 1
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' )
end
if match_index == 0 then
return str._error( 'Match index is out of range' )
end
if plain_flag then
pattern = str._escapePattern( pattern )
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start )
end
local iterator = mw.ustring.gmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table = {}
local count = 1
for w in iterator do
result_table[count] = w
count = count + 1
end
result = result_table[ count + match_index ]
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' )
else
return nomatch
end
else
return result
end
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
-- This is the entry point for #invoke:String|match
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} )
local s = new_args['s'] or ''
local start = tonumber( new_args['start'] ) or 1
local plain_flag = str._getBoolean( new_args['plain'] or false )
local pattern = new_args['pattern'] or ''
local match_index = math.floor( tonumber(new_args['match']) or 1 )
local nomatch = new_args['nomatch']
return str._match( s, pattern, start, match_index, plain_flag, nomatch )
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:String|pos|target_string|index_value}}
OR
{{#invoke:String|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} )
local target_str = new_args['target'] or ''
local pos = tonumber( new_args['pos'] ) or 0
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' )
end
return mw.ustring.sub( target_str, pos, pos )
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:String|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } )
local source_str = new_args['source'] or ''
local pattern = new_args['target'] or ''
local start_pos = tonumber(new_args['start']) or 1
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return 0
end
plain = str._getBoolean( plain )
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } )
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber( new_args['count'] )
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean( plain )
if plain then
pattern = str._escapePattern( pattern )
replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences.
end
local result
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count )
else
result = mw.ustring.gsub( source_str, pattern, replace )
end
return result
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
escapePattern
This function escapes special characters from a Lua string pattern. See [1]
for details on how patterns work.
[1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
Usage:
{{#invoke:String|escapePattern|pattern_string}}
Parameters
pattern_string: The pattern string to escape.
]]
function str.escapePattern( frame )
local pattern_str = frame.args[1]
if not pattern_str then
return str._error( 'No pattern string specified' )
end
local result = str._escapePattern( pattern_str )
return result
end
--[[
count
This function counts the number of occurrences of one string in another.
]]
function str.count(frame)
local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'})
local source = args.source or ''
local pattern = args.pattern or ''
local plain = str._getBoolean(args.plain or true)
if plain then
pattern = str._escapePattern(pattern)
end
local _, count = mw.ustring.gsub(source, pattern, '')
return count
end
--[[
endswith
This function determines whether a string ends with another string.
]]
function str.endswith(frame)
local args = str._getParameters(frame.args, {'source', 'pattern'})
local source = args.source or ''
local pattern = args.pattern or ''
if pattern == '' then
-- All strings end with the empty string.
return "yes"
end
if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then
return "yes"
else
return ""
end
end
--[[
join
Join all non empty arguments together; the first argument is the separator.
Usage:
{{#invoke:String|join|sep|one|two|three}}
]]
function str.join(frame)
local args = {}
local sep
for _, v in ipairs( frame.args ) do
if sep then
if v ~= '' then
table.insert(args, v)
end
else
sep = v
end
end
return table.concat( args, sep or '' )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {}
local index = 1
local value
for _, arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index]
index = index + 1
end
new_args[arg] = value
end
return new_args
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower()
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false
else
boolean_value = true
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str
else
error( 'No boolean value found' )
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
end
return str
73c9d229ca32cb5e05a3873238b69fec347cf4b1
Template:Soft redirect/doc
10
125
244
243
2024-02-01T19:43:37Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
== Summary ==
* This template is for creating [[metawikimedia:Soft redirect|soft redirects]], that is to say, short pages inviting readers to visit another page on a different wiki. In some cases, this cannot be performed with a classical redirect due to technical restrictions.
* This template is also used to redirect an entry to a [[mw:Help:Special page|special page]], in which case hard redirects have been disabled.
== Usage ==
=== Single parameter ===
<code><nowiki>{{</nowiki>Soft redirect|''target''}}</code>
'''Example'''
<code><nowiki>{{</nowiki>Soft redirect|Meta:Special:RequestWiki}}</code> will produce:
{{Soft redirect|Special:RequestWiki}}
===Two parameters===
<code><nowiki>{{</nowiki>Soft redirect|Special:RequestWiki|"Special:RequestWiki" on Meta}}</code>
'''Example'''
<code><nowiki>{{</nowiki>Soft redirect|Meta:Special:RequestWiki|"Special:RequestWiki" on Meta}}</code> will produce:
{{Soft redirect|Meta:Special:RequestWiki|"Special:RequestWiki" on Meta}}
<includeonly>[[Category:Templates]]</includeonly>
2588596738afc76eb9944ac61e29235c31d43ec7
Template:Infobox character/doc
10
126
246
245
2024-02-01T19:43:39Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
'''Infobox character''' is used to create an infobox for a fictional character of any type.
== Usage ==
The blank form immediately below shows the most commonly used fields, and complete instructions are listed further down the page.
{{Infobox character
| name = {{{name}}}
| series = {{{series}}}
| image = {{{image}}}
| alt = {{{alt}}}
| caption = {{{caption}}}
| first_major = {{{first_major}}}
| first_minor = {{{first_minor}}}
| first_date = {{{first_date}}}
| last_major = {{{last_major}}}
| last_minor = {{{last_minor}}}
| last_date = {{{last_date}}}
| creator = {{{creator}}}
| based_on = {{{based_on}}}
| adapted_by = {{{adapted_by}}}
| designer = {{{designer}}}
| portrayer = {{{portrayer}}}
| voice = {{{voice}}}
| motion_actor = {{{motion_actor}}}
| full_name = {{{full_name}}}
| nickname = {{{nickname}}}
| alias = {{{alias}}}
| species = {{{species}}}
| gender = {{{gender}}}
| title = {{{title}}}
| occupation = {{{occupation}}}
| affiliation = {{{affiliation}}}
| fighting_style = {{{fighting_style}}}
| weapon = {{{weapon}}}
| family = {{{family}}}
| spouse = {{{spouse}}}
| significant_other = {{{significant_other}}}
| children = {{{children}}}
| relatives = {{{relatives}}}
| religion = {{{religion}}}
| origin = {{{origin}}}
| nationality = {{{nationality}}}
}}
<syntaxhighlight lang="html" style="overflow:auto">{{Infobox character
| color = <!-- headers background color; the foreground color is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| image =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| first = <!-- Use instead of first_major= etc. when custom or complex formatting is needed. -->
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| last = <!-- Use instead of last_major= etc. when custom or complex formatting is needed. -->
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
}}</syntaxhighlight>
== Parameters ==
All parameters are optional.
{| class="wikitable"
|-
! scope="col" | Parameter
! scope="col" | Notes
|-
! scope="row" | color
| Background color for header bars (default = #DEDEE2). The text color is automatically determined. Must meet AAA compliance standards outlines on [[WP:COLOR]].
|-
! scope="row" | name
| Character name to display in top header (default = PAGENAME).
|-
! scope="row" | series
| Name of the series in which the character appears.
|-
! scope="row" | franchise
| Name of the fictional world or story in which the character appears. Does not italicize title.
|-
! scope="row" | multiple
| Set to yes if the infobox describes more than one character.
|-
! scope="row" | image
| Image of the character. "File:" and wikilinking is not required. i.e. use {{para|image|Example.png}}.
|-
! scope="row" | image_upright
| The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px.
|-
! scope="row" | alt
| Alt text for image
|-
! scope="row" | caption
| A caption explaining the image.
|-
! scope="row" | first_major
| The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | first_minor
| The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | first_issue
| The number of the comic book issue the fictional element first appeared in.
|-
! scope="row" | first_date
| The date of the publication/release of the minor work where the fictional element first appeared in.
|-
! scope="row" | last_major
| The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | last_minor
| The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | last_issue
| The number of the comic book issue the fictional element last appeared in.
|-
! scope="row" | last_date
| The date of the publication/release of the minor work where the fictional element last appeared in.
|-
! scope="row" | first
| First appearance of the character.
|-
! scope="row" | firstgame
| First appearance in a game of the character.
|-
! scope="row" | last
| Last appearance of the character.
|-
! scope="row" | creator
| Name of the individuals who are credited with the creation of the character.
|-
! scope="row" | based_on
| Name of the original character the adaptation is based on. Use this field in conjunction with {{para|adapted_by}}.
|-
! scope="row" | adapted_by
| Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character.
|-
! scope="row" | designer
| Name of the individuals who designed the character.
|-
! scope="row" | portrayer
| Name of the individuals who portrayed the character.
|-
! scope="row" | voice
| Name of the individuals who voiced the character. Should be omitted if the same as "portrayer".
|-
! scope="row" | motion_actor
| Name of the individuals who portrayed the character in motion capture.
|-
! scope="row" | noinfo
| Disable the first "In-universe information" header.
|-
! scope="row" | info-hdr
| Text for display in second header (default = Information).
|-
! scope="row" | full_name
| The character's full name.
|-
! scope="row" | nickname/nicknames
| Any nicknames used by the character.
|-
! scope="row" | alias/aliases
| Any aliases used by the character.
|-
! scope="row" | species/race
| The species or race of the character. Use for non-human characters only.
|-
! scope="row" | gender
| The gender of the character. Use only if not obvious.
|-
! scope="row" | title
| Titles the character was known by.
|-
! scope="row" | occupation/position
| The character's job or role.
|-
! scope="row" | class
| The character class for RPG characters.
|-
! scope="row" | affiliation
| The groups or teams the character belongs to.
|-
! scope="row" | alignment
| The character's Dungeons & Dragons alignment.
|-
! scope="row" | fighting_style
| The primary fighting styles used by the character.
|-
! scope="row" | weapon
| The types of weapons the character uses.
|-
! scope="row" | family
| The character's family members.
|-
! scope="row" | spouse/spouses
| The character's spouses.
|-
! scope="row" | significant_other/significant_others
| The character's significant others.
|-
! scope="row" | children
| The characters's children.
|-
! scope="row" | relatives
| The characters's relatives.
|-
! scope="row" | religion
| The character's religion.
|-
! scope="row" | origin/home
| The character's place of origin.
|-
! scope="row" | nationality
| The character's nationality.
|-
! scope="row" | extra-hdr
| Text for display in third header (default = No third header).
|-
! scope="row" | lbl#
| Label to display in left column where "#" is 1-5, 21-25, or 31-35 for custom fields under the 1st, 2nd, or 3rd headers respectively.
|-
! scope="row" | data#
| Text to display in the right column corresponding to the appropriate "lbl#".
|}
===TemplateData===
<templatedata>
{
"description": "Creates an infobox for a fictional character of any type.",
"params": {
"color": {
"label": "Color",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Background color for header bars (default = #DEDEE2). The text color is automatically computed. Must meet AAA compliance standards outlines on [[WP:COLOR]].",
"aliases": [
"colour"
]
},
"name": {
"label": "Name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Character name to display in top header (default = PAGENAME)."
},
"series": {
"label": "Series",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the series in which the character appears."
},
"franchise": {
"label": "Franchise",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the fictional world or story in which the character appears. Does not italicize title."
},
"multiple": {
"label": "Multiple",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Set to yes if the infobox describes more than one character."
},
"image": {
"label": "Image",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Image of the character. \"File:\" and wikilinking is not required. i.e. use {{para|image|Example.png}}."
},
"image_upright": {
"label": "Image upright",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px."
},
"alt": {
"label": "Alt",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Alt text for image per [[WP:MOSALT]]."
},
"caption": {
"label": "Caption",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A caption explaining the image."
},
"first_major": {
"label": "First appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games."
},
"first_minor": {
"label": "First appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"first_issue": {
"label": "First appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element first appeared in."
},
"first_date": {
"label": "First appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element first appeared in."
},
"last_major": {
"label": "Last appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games."
},
"last_minor": {
"label": "Last appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"last_issue": {
"label": "Last appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element last appeared in."
},
"last_date": {
"label": "Last appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element last appeared in."
},
"first": {
"label": "First appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance of the character."
},
"firstgame": {
"label": "First game",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance in a game of the character."
},
"last": {
"label": "Last appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Last appearance of the character."
},
"creator": {
"label": "Creator",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who are credited with the creation of the character."
},
"based_on": {
"label": "Based on",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the original character the adaptation is based on. Use {{based on}} to add the title of original character and the names of the original creators. Use this field in conjunction with {{para|adapted_by}}."
},
"adapted_by": {
"label": "Adapted by",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character."
},
"designer": {
"label": "Designer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who designed the character."
},
"portrayer": {
"label": "Portrayer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character."
},
"voice": {
"label": "Voice actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who voiced the character (if different from portrayer or there is no portrayer)"
},
"motion_actor": {
"label": "Motion actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character in motion capture."
},
"lbl1": {
"label": "Label 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Label to display in left column for custom fields under the 1st header."
},
"data1": {
"label": "Data 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text to display in the right column corresponding to lbl1."
},
"lbl2": {
"label": "Label 2",
"inherits": "lbl1"
},
"data2": {
"label": "Data 2",
"description": "Text to display in the right column corresponding to lbl2.",
"inherits": "data1"
},
"lbl3": {
"label": "Label 3",
"inherits": "lbl1"
},
"data3": {
"label": "Data 3",
"description": "Text to display in the right column corresponding to lbl3.",
"inherits": "data1"
},
"lbl4": {
"label": "Label 4",
"inherits": "lbl1"
},
"data4": {
"label": "Data 4",
"description": "Text to display in the right column corresponding to lbl4.",
"inherits": "data1"
},
"lbl5": {
"label": "Label 5",
"inherits": "lbl1"
},
"data5": {
"label": "Data 5",
"description": "Text to display in the right column corresponding to lbl5.",
"inherits": "data1"
},
"noinfo": {
"label": "Disable second header",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Disable the first \"In-universe information\" header."
},
"info-hdr": {
"label": "Second header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in second header (default = Information)."
},
"full_name": {
"label": "Full name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's full name."
},
"nickname": {
"label": "Nickname",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A nickname used by the character. If there is more than one nickname, use {{para|nicknames}}."
},
"nicknames": {
"label": "Nicknames",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any nicknames used by the character. If there is only one nickname, use {{para|nickname}}."
},
"alias": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "An alias used by the character. If there is more than one alias, use {{para|aliases}}."
},
"aliases": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any aliases used by the character. If there is only one alias, use {{para|alias}}."
},
"species": {
"label": "Species",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The species of the character. Use for non-human characters only."
},
"race": {
"label": "Race",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The race of the character. Use for non-human characters only."
},
"gender": {
"label": "Gender",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The gender of the character. Use only if not obvious."
},
"title": {
"label": "Title",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Titles the character was known by."
},
"occupation": {
"label": "Occupation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"position": {
"label": "Position",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"class": {
"label": "Class",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character class for RPG characters."
},
"affiliation": {
"label": "Affiliation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The groups or teams the character belongs to."
},
"alignment": {
"label": "Alignment",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's Dungeons & Dragons alignment."
},
"fighting_style": {
"label": "Fighting style",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The primary fighting styles used by the character."
},
"weapon": {
"label": "Weapon",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The types of weapons the character uses."
},
"family": {
"label": "Family",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's family members."
},
"spouse": {
"label": "Spouse",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"spouses": {
"label": "Spouses",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"significant_other": {
"label": "Significant other",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is more than one significant_other, use {{para|significant_others}}."
},
"significant_others": {
"label": "Significant others",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is only one significant_other, use {{para|significant_other}}."
},
"children": {
"label": "Children",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's children"
},
"relatives": {
"label": "Relatives",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's relatives"
},
"religion": {
"label": "Religion",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's religion"
},
"origin": {
"label": "Origin",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"home": {
"label": "Home",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"nationality": {
"label": "Nationality",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's nationality."
},
"lbl21": {
"label": "Label 21",
"description": "Label to display in left column for custom fields under the 2nd header.",
"inherits": "lbl1"
},
"data21": {
"label": "Data 21",
"description": "Text to display in the right column corresponding to lbl21.",
"inherits": "data1"
},
"lbl22": {
"label": "Label 22",
"inherits": "lbl21"
},
"data22": {
"label": "Data 22",
"description": "Text to display in the right column corresponding to lbl22.",
"inherits": "data1"
},
"lbl23": {
"label": "Label 23",
"inherits": "lbl21"
},
"data23": {
"label": "Data 23",
"description": "Text to display in the right column corresponding to lbl23.",
"inherits": "data1"
},
"lbl24": {
"label": "Label 24",
"inherits": "lbl21"
},
"data24": {
"label": "Data 24",
"description": "Text to display in the right column corresponding to lbl24.",
"inherits": "data1"
},
"lbl25": {
"label": "Label 25",
"inherits": "lbl21"
},
"data25": {
"label": "Data 25",
"description": "Text to display in the right column corresponding to lbl25.",
"inherits": "data1"
},
"extra-hdr": {
"label": "Third header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in third header (default = No third header)."
},
"lbl31": {
"label": "Label 31",
"description": "Label to display in left column for custom fields under the 3rd header.",
"inherits": "lbl22"
},
"data31": {
"label": "Data 31",
"description": "Text to display in the right column corresponding to lbl31.",
"inherits": "data1"
},
"lbl32": {
"label": "Label 32",
"inherits": "lbl31"
},
"data32": {
"label": "Data 32",
"description": "Text to display in the right column corresponding to lbl32.",
"inherits": "data1"
},
"lbl33": {
"label": "Label 33",
"inherits": "lbl31"
},
"data33": {
"label": "Data 33",
"description": "Text to display in the right column corresponding to lbl33.",
"inherits": "data1"
},
"lbl34": {
"label": "Label 34",
"inherits": "lbl31"
},
"data34": {
"label": "Data 34",
"description": "Text to display in the right column corresponding to lbl34.",
"inherits": "data1"
},
"lbl35": {
"label": "Label 35",
"inherits": "lbl31"
},
"data35": {
"label": "Data 35",
"description": "Text to display in the right column corresponding to lbl35.",
"inherits": "data1"
}
},
"format": "block"
}
</templatedata>
=== All parameters (not for general use) ===
<pre>{{Infobox character
| color = <!-- headers background colour; the foreground colour is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| multiple =
| image =
| image_upright =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| first =
| firstgame =
| last =
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| lbl1 =
| data1 =
| lbl2 =
| data2 =
| lbl3 =
| data3 =
| lbl4 =
| data4 =
| lbl5 =
| data5 =
| noinfo =
| info-hdr =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
| lbl21 =
| data21 =
| lbl22 =
| data22 =
| lbl23 =
| data23 =
| lbl24 =
| data24 =
| lbl25 =
| data25 =
| extra-hdr =
| lbl31 =
| data31 =
| lbl32 =
| data32 =
| lbl33 =
| data33 =
| lbl34 =
| data34 =
| lbl35 =
| data35 =
}}</pre>
== Example ==
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
<syntaxhighlight lang="moin">
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
</syntaxhighlight>
<includeonly>
[[Category:Templates]]
</includeonly>
c3b5673c7b9ea096939919c0cf7da9d3440d78e7
495
246
2024-02-01T19:45:02Z
Bonclide
2
/* TemplateData */
wikitext
text/x-wiki
{{Documentation subpage}}
'''Infobox character''' is used to create an infobox for a fictional character of any type.
== Usage ==
The blank form immediately below shows the most commonly used fields, and complete instructions are listed further down the page.
{{Infobox character
| name = {{{name}}}
| series = {{{series}}}
| image = {{{image}}}
| alt = {{{alt}}}
| caption = {{{caption}}}
| first_major = {{{first_major}}}
| first_minor = {{{first_minor}}}
| first_date = {{{first_date}}}
| last_major = {{{last_major}}}
| last_minor = {{{last_minor}}}
| last_date = {{{last_date}}}
| creator = {{{creator}}}
| based_on = {{{based_on}}}
| adapted_by = {{{adapted_by}}}
| designer = {{{designer}}}
| portrayer = {{{portrayer}}}
| voice = {{{voice}}}
| motion_actor = {{{motion_actor}}}
| full_name = {{{full_name}}}
| nickname = {{{nickname}}}
| alias = {{{alias}}}
| species = {{{species}}}
| gender = {{{gender}}}
| title = {{{title}}}
| occupation = {{{occupation}}}
| affiliation = {{{affiliation}}}
| fighting_style = {{{fighting_style}}}
| weapon = {{{weapon}}}
| family = {{{family}}}
| spouse = {{{spouse}}}
| significant_other = {{{significant_other}}}
| children = {{{children}}}
| relatives = {{{relatives}}}
| religion = {{{religion}}}
| origin = {{{origin}}}
| nationality = {{{nationality}}}
}}
<syntaxhighlight lang="html" style="overflow:auto">{{Infobox character
| color = <!-- headers background color; the foreground color is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| image =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| first = <!-- Use instead of first_major= etc. when custom or complex formatting is needed. -->
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| last = <!-- Use instead of last_major= etc. when custom or complex formatting is needed. -->
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
}}</syntaxhighlight>
== Parameters ==
All parameters are optional.
{| class="wikitable"
|-
! scope="col" | Parameter
! scope="col" | Notes
|-
! scope="row" | color
| Background color for header bars (default = #DEDEE2). The text color is automatically determined. Must meet AAA compliance standards outlines on [[WP:COLOR]].
|-
! scope="row" | name
| Character name to display in top header (default = PAGENAME).
|-
! scope="row" | series
| Name of the series in which the character appears.
|-
! scope="row" | franchise
| Name of the fictional world or story in which the character appears. Does not italicize title.
|-
! scope="row" | multiple
| Set to yes if the infobox describes more than one character.
|-
! scope="row" | image
| Image of the character. "File:" and wikilinking is not required. i.e. use {{para|image|Example.png}}.
|-
! scope="row" | image_upright
| The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px.
|-
! scope="row" | alt
| Alt text for image
|-
! scope="row" | caption
| A caption explaining the image.
|-
! scope="row" | first_major
| The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | first_minor
| The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | first_issue
| The number of the comic book issue the fictional element first appeared in.
|-
! scope="row" | first_date
| The date of the publication/release of the minor work where the fictional element first appeared in.
|-
! scope="row" | last_major
| The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | last_minor
| The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | last_issue
| The number of the comic book issue the fictional element last appeared in.
|-
! scope="row" | last_date
| The date of the publication/release of the minor work where the fictional element last appeared in.
|-
! scope="row" | first
| First appearance of the character.
|-
! scope="row" | firstgame
| First appearance in a game of the character.
|-
! scope="row" | last
| Last appearance of the character.
|-
! scope="row" | creator
| Name of the individuals who are credited with the creation of the character.
|-
! scope="row" | based_on
| Name of the original character the adaptation is based on. Use this field in conjunction with {{para|adapted_by}}.
|-
! scope="row" | adapted_by
| Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character.
|-
! scope="row" | designer
| Name of the individuals who designed the character.
|-
! scope="row" | portrayer
| Name of the individuals who portrayed the character.
|-
! scope="row" | voice
| Name of the individuals who voiced the character. Should be omitted if the same as "portrayer".
|-
! scope="row" | motion_actor
| Name of the individuals who portrayed the character in motion capture.
|-
! scope="row" | noinfo
| Disable the first "In-universe information" header.
|-
! scope="row" | info-hdr
| Text for display in second header (default = Information).
|-
! scope="row" | full_name
| The character's full name.
|-
! scope="row" | nickname/nicknames
| Any nicknames used by the character.
|-
! scope="row" | alias/aliases
| Any aliases used by the character.
|-
! scope="row" | species/race
| The species or race of the character. Use for non-human characters only.
|-
! scope="row" | gender
| The gender of the character. Use only if not obvious.
|-
! scope="row" | title
| Titles the character was known by.
|-
! scope="row" | occupation/position
| The character's job or role.
|-
! scope="row" | class
| The character class for RPG characters.
|-
! scope="row" | affiliation
| The groups or teams the character belongs to.
|-
! scope="row" | alignment
| The character's Dungeons & Dragons alignment.
|-
! scope="row" | fighting_style
| The primary fighting styles used by the character.
|-
! scope="row" | weapon
| The types of weapons the character uses.
|-
! scope="row" | family
| The character's family members.
|-
! scope="row" | spouse/spouses
| The character's spouses.
|-
! scope="row" | significant_other/significant_others
| The character's significant others.
|-
! scope="row" | children
| The characters's children.
|-
! scope="row" | relatives
| The characters's relatives.
|-
! scope="row" | religion
| The character's religion.
|-
! scope="row" | origin/home
| The character's place of origin.
|-
! scope="row" | nationality
| The character's nationality.
|-
! scope="row" | extra-hdr
| Text for display in third header (default = No third header).
|-
! scope="row" | lbl#
| Label to display in left column where "#" is 1-5, 21-25, or 31-35 for custom fields under the 1st, 2nd, or 3rd headers respectively.
|-
! scope="row" | data#
| Text to display in the right column corresponding to the appropriate "lbl#".
|}
===TemplateData===
<templatedata>
{
"description": "Creates an infobox for a fictional character of any type.",
"params": {
"color": {
"label": "Color",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Background color for header bars (default = #DEDEE2). The text color is automatically computed. Must meet AAA compliance standards outlines on [[WP:COLOR]].",
"aliases": [
"colour"
]
},
"name": {
"label": "Name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Character name to display in top header (default = PAGENAME)."
},
"series": {
"label": "Series",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the series in which the character appears."
},
"franchise": {
"label": "Franchise",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the fictional world or story in which the character appears. Does not italicize title."
},
"multiple": {
"label": "Multiple",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Set to yes if the infobox describes more than one character."
},
"image": {
"label": "Image",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Image of the character. \"File:\" and wikilinking is not required. i.e. use {{para|image|Example.png}}."
},
"image_upright": {
"label": "Image upright",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px."
},
"alt": {
"label": "Alt",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Alt text for image per [[WP:MOSALT]]."
},
"caption": {
"label": "Caption",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A caption explaining the image."
},
"first_major": {
"label": "First appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games."
},
"first_minor": {
"label": "First appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"first_issue": {
"label": "First appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element first appeared in."
},
"first_date": {
"label": "First appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element first appeared in."
},
"last_major": {
"label": "Last appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games."
},
"last_minor": {
"label": "Last appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"last_issue": {
"label": "Last appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element last appeared in."
},
"last_date": {
"label": "Last appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element last appeared in."
},
"first": {
"label": "First appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance of the character."
},
"firstgame": {
"label": "First game",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance in a game of the character."
},
"last": {
"label": "Last appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Last appearance of the character."
},
"creator": {
"label": "Creator",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who are credited with the creation of the character."
},
"based_on": {
"label": "Based on",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the original character the adaptation is based on. Use to add the title of original character and the names of the original creators. Use this field in conjunction with {{para|adapted_by}}."
},
"adapted_by": {
"label": "Adapted by",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character."
},
"designer": {
"label": "Designer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who designed the character."
},
"portrayer": {
"label": "Portrayer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character."
},
"voice": {
"label": "Voice actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who voiced the character (if different from portrayer or there is no portrayer)"
},
"motion_actor": {
"label": "Motion actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character in motion capture."
},
"lbl1": {
"label": "Label 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Label to display in left column for custom fields under the 1st header."
},
"data1": {
"label": "Data 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text to display in the right column corresponding to lbl1."
},
"lbl2": {
"label": "Label 2",
"inherits": "lbl1"
},
"data2": {
"label": "Data 2",
"description": "Text to display in the right column corresponding to lbl2.",
"inherits": "data1"
},
"lbl3": {
"label": "Label 3",
"inherits": "lbl1"
},
"data3": {
"label": "Data 3",
"description": "Text to display in the right column corresponding to lbl3.",
"inherits": "data1"
},
"lbl4": {
"label": "Label 4",
"inherits": "lbl1"
},
"data4": {
"label": "Data 4",
"description": "Text to display in the right column corresponding to lbl4.",
"inherits": "data1"
},
"lbl5": {
"label": "Label 5",
"inherits": "lbl1"
},
"data5": {
"label": "Data 5",
"description": "Text to display in the right column corresponding to lbl5.",
"inherits": "data1"
},
"noinfo": {
"label": "Disable second header",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Disable the first \"In-universe information\" header."
},
"info-hdr": {
"label": "Second header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in second header (default = Information)."
},
"full_name": {
"label": "Full name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's full name."
},
"nickname": {
"label": "Nickname",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A nickname used by the character. If there is more than one nickname, use {{para|nicknames}}."
},
"nicknames": {
"label": "Nicknames",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any nicknames used by the character. If there is only one nickname, use {{para|nickname}}."
},
"alias": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "An alias used by the character. If there is more than one alias, use {{para|aliases}}."
},
"aliases": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any aliases used by the character. If there is only one alias, use {{para|alias}}."
},
"species": {
"label": "Species",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The species of the character. Use for non-human characters only."
},
"race": {
"label": "Race",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The race of the character. Use for non-human characters only."
},
"gender": {
"label": "Gender",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The gender of the character. Use only if not obvious."
},
"title": {
"label": "Title",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Titles the character was known by."
},
"occupation": {
"label": "Occupation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"position": {
"label": "Position",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"class": {
"label": "Class",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character class for RPG characters."
},
"affiliation": {
"label": "Affiliation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The groups or teams the character belongs to."
},
"alignment": {
"label": "Alignment",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's Dungeons & Dragons alignment."
},
"fighting_style": {
"label": "Fighting style",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The primary fighting styles used by the character."
},
"weapon": {
"label": "Weapon",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The types of weapons the character uses."
},
"family": {
"label": "Family",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's family members."
},
"spouse": {
"label": "Spouse",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"spouses": {
"label": "Spouses",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"significant_other": {
"label": "Significant other",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is more than one significant_other, use {{para|significant_others}}."
},
"significant_others": {
"label": "Significant others",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is only one significant_other, use {{para|significant_other}}."
},
"children": {
"label": "Children",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's children"
},
"relatives": {
"label": "Relatives",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's relatives"
},
"religion": {
"label": "Religion",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's religion"
},
"origin": {
"label": "Origin",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"home": {
"label": "Home",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"nationality": {
"label": "Nationality",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's nationality."
},
"lbl21": {
"label": "Label 21",
"description": "Label to display in left column for custom fields under the 2nd header.",
"inherits": "lbl1"
},
"data21": {
"label": "Data 21",
"description": "Text to display in the right column corresponding to lbl21.",
"inherits": "data1"
},
"lbl22": {
"label": "Label 22",
"inherits": "lbl21"
},
"data22": {
"label": "Data 22",
"description": "Text to display in the right column corresponding to lbl22.",
"inherits": "data1"
},
"lbl23": {
"label": "Label 23",
"inherits": "lbl21"
},
"data23": {
"label": "Data 23",
"description": "Text to display in the right column corresponding to lbl23.",
"inherits": "data1"
},
"lbl24": {
"label": "Label 24",
"inherits": "lbl21"
},
"data24": {
"label": "Data 24",
"description": "Text to display in the right column corresponding to lbl24.",
"inherits": "data1"
},
"lbl25": {
"label": "Label 25",
"inherits": "lbl21"
},
"data25": {
"label": "Data 25",
"description": "Text to display in the right column corresponding to lbl25.",
"inherits": "data1"
},
"extra-hdr": {
"label": "Third header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in third header (default = No third header)."
},
"lbl31": {
"label": "Label 31",
"description": "Label to display in left column for custom fields under the 3rd header.",
"inherits": "lbl22"
},
"data31": {
"label": "Data 31",
"description": "Text to display in the right column corresponding to lbl31.",
"inherits": "data1"
},
"lbl32": {
"label": "Label 32",
"inherits": "lbl31"
},
"data32": {
"label": "Data 32",
"description": "Text to display in the right column corresponding to lbl32.",
"inherits": "data1"
},
"lbl33": {
"label": "Label 33",
"inherits": "lbl31"
},
"data33": {
"label": "Data 33",
"description": "Text to display in the right column corresponding to lbl33.",
"inherits": "data1"
},
"lbl34": {
"label": "Label 34",
"inherits": "lbl31"
},
"data34": {
"label": "Data 34",
"description": "Text to display in the right column corresponding to lbl34.",
"inherits": "data1"
},
"lbl35": {
"label": "Label 35",
"inherits": "lbl31"
},
"data35": {
"label": "Data 35",
"description": "Text to display in the right column corresponding to lbl35.",
"inherits": "data1"
}
},
"format": "block"
}
</templatedata>
=== All parameters (not for general use) ===
<pre>{{Infobox character
| color = <!-- headers background colour; the foreground colour is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| multiple =
| image =
| image_upright =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| first =
| firstgame =
| last =
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| lbl1 =
| data1 =
| lbl2 =
| data2 =
| lbl3 =
| data3 =
| lbl4 =
| data4 =
| lbl5 =
| data5 =
| noinfo =
| info-hdr =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
| lbl21 =
| data21 =
| lbl22 =
| data22 =
| lbl23 =
| data23 =
| lbl24 =
| data24 =
| lbl25 =
| data25 =
| extra-hdr =
| lbl31 =
| data31 =
| lbl32 =
| data32 =
| lbl33 =
| data33 =
| lbl34 =
| data34 =
| lbl35 =
| data35 =
}}</pre>
== Example ==
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
<syntaxhighlight lang="moin">
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
</syntaxhighlight>
<includeonly>
[[Category:Templates]]
</includeonly>
e3c86c04a4538244a13dfe1d8871b8c31b767b48
496
495
2024-02-01T19:48:36Z
Bonclide
2
/* TemplateData */
wikitext
text/x-wiki
{{Documentation subpage}}
'''Infobox character''' is used to create an infobox for a fictional character of any type.
== Usage ==
The blank form immediately below shows the most commonly used fields, and complete instructions are listed further down the page.
{{Infobox character
| name = {{{name}}}
| series = {{{series}}}
| image = {{{image}}}
| alt = {{{alt}}}
| caption = {{{caption}}}
| first_major = {{{first_major}}}
| first_minor = {{{first_minor}}}
| first_date = {{{first_date}}}
| last_major = {{{last_major}}}
| last_minor = {{{last_minor}}}
| last_date = {{{last_date}}}
| creator = {{{creator}}}
| based_on = {{{based_on}}}
| adapted_by = {{{adapted_by}}}
| designer = {{{designer}}}
| portrayer = {{{portrayer}}}
| voice = {{{voice}}}
| motion_actor = {{{motion_actor}}}
| full_name = {{{full_name}}}
| nickname = {{{nickname}}}
| alias = {{{alias}}}
| species = {{{species}}}
| gender = {{{gender}}}
| title = {{{title}}}
| occupation = {{{occupation}}}
| affiliation = {{{affiliation}}}
| fighting_style = {{{fighting_style}}}
| weapon = {{{weapon}}}
| family = {{{family}}}
| spouse = {{{spouse}}}
| significant_other = {{{significant_other}}}
| children = {{{children}}}
| relatives = {{{relatives}}}
| religion = {{{religion}}}
| origin = {{{origin}}}
| nationality = {{{nationality}}}
}}
<syntaxhighlight lang="html" style="overflow:auto">{{Infobox character
| color = <!-- headers background color; the foreground color is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| image =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| first = <!-- Use instead of first_major= etc. when custom or complex formatting is needed. -->
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| last = <!-- Use instead of last_major= etc. when custom or complex formatting is needed. -->
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
}}</syntaxhighlight>
== Parameters ==
All parameters are optional.
{| class="wikitable"
|-
! scope="col" | Parameter
! scope="col" | Notes
|-
! scope="row" | color
| Background color for header bars (default = #DEDEE2). The text color is automatically determined. Must meet AAA compliance standards outlines on [[WP:COLOR]].
|-
! scope="row" | name
| Character name to display in top header (default = PAGENAME).
|-
! scope="row" | series
| Name of the series in which the character appears.
|-
! scope="row" | franchise
| Name of the fictional world or story in which the character appears. Does not italicize title.
|-
! scope="row" | multiple
| Set to yes if the infobox describes more than one character.
|-
! scope="row" | image
| Image of the character. "File:" and wikilinking is not required. i.e. use {{para|image|Example.png}}.
|-
! scope="row" | image_upright
| The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px.
|-
! scope="row" | alt
| Alt text for image
|-
! scope="row" | caption
| A caption explaining the image.
|-
! scope="row" | first_major
| The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | first_minor
| The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | first_issue
| The number of the comic book issue the fictional element first appeared in.
|-
! scope="row" | first_date
| The date of the publication/release of the minor work where the fictional element first appeared in.
|-
! scope="row" | last_major
| The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | last_minor
| The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | last_issue
| The number of the comic book issue the fictional element last appeared in.
|-
! scope="row" | last_date
| The date of the publication/release of the minor work where the fictional element last appeared in.
|-
! scope="row" | first
| First appearance of the character.
|-
! scope="row" | firstgame
| First appearance in a game of the character.
|-
! scope="row" | last
| Last appearance of the character.
|-
! scope="row" | creator
| Name of the individuals who are credited with the creation of the character.
|-
! scope="row" | based_on
| Name of the original character the adaptation is based on. Use this field in conjunction with {{para|adapted_by}}.
|-
! scope="row" | adapted_by
| Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character.
|-
! scope="row" | designer
| Name of the individuals who designed the character.
|-
! scope="row" | portrayer
| Name of the individuals who portrayed the character.
|-
! scope="row" | voice
| Name of the individuals who voiced the character. Should be omitted if the same as "portrayer".
|-
! scope="row" | motion_actor
| Name of the individuals who portrayed the character in motion capture.
|-
! scope="row" | noinfo
| Disable the first "In-universe information" header.
|-
! scope="row" | info-hdr
| Text for display in second header (default = Information).
|-
! scope="row" | full_name
| The character's full name.
|-
! scope="row" | nickname/nicknames
| Any nicknames used by the character.
|-
! scope="row" | alias/aliases
| Any aliases used by the character.
|-
! scope="row" | species/race
| The species or race of the character. Use for non-human characters only.
|-
! scope="row" | gender
| The gender of the character. Use only if not obvious.
|-
! scope="row" | title
| Titles the character was known by.
|-
! scope="row" | occupation/position
| The character's job or role.
|-
! scope="row" | class
| The character class for RPG characters.
|-
! scope="row" | affiliation
| The groups or teams the character belongs to.
|-
! scope="row" | alignment
| The character's Dungeons & Dragons alignment.
|-
! scope="row" | fighting_style
| The primary fighting styles used by the character.
|-
! scope="row" | weapon
| The types of weapons the character uses.
|-
! scope="row" | family
| The character's family members.
|-
! scope="row" | spouse/spouses
| The character's spouses.
|-
! scope="row" | significant_other/significant_others
| The character's significant others.
|-
! scope="row" | children
| The characters's children.
|-
! scope="row" | relatives
| The characters's relatives.
|-
! scope="row" | religion
| The character's religion.
|-
! scope="row" | origin/home
| The character's place of origin.
|-
! scope="row" | nationality
| The character's nationality.
|-
! scope="row" | extra-hdr
| Text for display in third header (default = No third header).
|-
! scope="row" | lbl#
| Label to display in left column where "#" is 1-5, 21-25, or 31-35 for custom fields under the 1st, 2nd, or 3rd headers respectively.
|-
! scope="row" | data#
| Text to display in the right column corresponding to the appropriate "lbl#".
|}
===TemplateData===
<templatedata>
{
"description": "Creates an infobox for a fictional character of any type.",
"params": {
"color": {
"label": "Color",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Background color for header bars (default = #DEDEE2). The text color is automatically computed. Must meet AAA compliance standards outlines on [[WP:COLOR]].",
"aliases": [
"colour"
]
},
"name": {
"label": "Name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Character name to display in top header (default = PAGENAME)."
},
"series": {
"label": "Series",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the series in which the character appears."
},
"franchise": {
"label": "Franchise",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the fictional world or story in which the character appears. Does not italicize title."
},
"multiple": {
"label": "Multiple",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Set to yes if the infobox describes more than one character."
},
"image": {
"label": "Image",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Image of the character. \"File:\" and wikilinking is not required. i.e. use {{para|image|Example.png}}."
},
"image_upright": {
"label": "Image upright",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px."
},
"alt": {
"label": "Alt",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Alt text for image per [[WP:MOSALT]]."
},
"caption": {
"label": "Caption",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A caption explaining the image."
},
"first_major": {
"label": "First appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games."
},
"first_minor": {
"label": "First appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"first_issue": {
"label": "First appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element first appeared in."
},
"first_date": {
"label": "First appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element first appeared in."
},
"last_major": {
"label": "Last appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games."
},
"last_minor": {
"label": "Last appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"last_issue": {
"label": "Last appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element last appeared in."
},
"last_date": {
"label": "Last appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element last appeared in."
},
"first": {
"label": "First appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance of the character."
},
"firstgame": {
"label": "First game",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance in a game of the character."
},
"last": {
"label": "Last appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Last appearance of the character."
},
"creator": {
"label": "Creator",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who are credited with the creation of the character."
},
"based_on": {
"label": "Based on",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the original character the adaptation is based on.."
},
"adapted_by": {
"label": "Adapted by",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character."
},
"designer": {
"label": "Designer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who designed the character."
},
"portrayer": {
"label": "Portrayer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character."
},
"voice": {
"label": "Voice actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who voiced the character (if different from portrayer or there is no portrayer)"
},
"motion_actor": {
"label": "Motion actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character in motion capture."
},
"lbl1": {
"label": "Label 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Label to display in left column for custom fields under the 1st header."
},
"data1": {
"label": "Data 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text to display in the right column corresponding to lbl1."
},
"lbl2": {
"label": "Label 2",
"inherits": "lbl1"
},
"data2": {
"label": "Data 2",
"description": "Text to display in the right column corresponding to lbl2.",
"inherits": "data1"
},
"lbl3": {
"label": "Label 3",
"inherits": "lbl1"
},
"data3": {
"label": "Data 3",
"description": "Text to display in the right column corresponding to lbl3.",
"inherits": "data1"
},
"lbl4": {
"label": "Label 4",
"inherits": "lbl1"
},
"data4": {
"label": "Data 4",
"description": "Text to display in the right column corresponding to lbl4.",
"inherits": "data1"
},
"lbl5": {
"label": "Label 5",
"inherits": "lbl1"
},
"data5": {
"label": "Data 5",
"description": "Text to display in the right column corresponding to lbl5.",
"inherits": "data1"
},
"noinfo": {
"label": "Disable second header",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Disable the first \"In-universe information\" header."
},
"info-hdr": {
"label": "Second header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in second header (default = Information)."
},
"full_name": {
"label": "Full name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's full name."
},
"nickname": {
"label": "Nickname",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A nickname used by the character. If there is more than one nickname, use {{para|nicknames}}."
},
"nicknames": {
"label": "Nicknames",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any nicknames used by the character. If there is only one nickname, use {{para|nickname}}."
},
"alias": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "An alias used by the character. If there is more than one alias, use {{para|aliases}}."
},
"aliases": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any aliases used by the character. If there is only one alias, use {{para|alias}}."
},
"species": {
"label": "Species",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The species of the character. Use for non-human characters only."
},
"race": {
"label": "Race",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The race of the character. Use for non-human characters only."
},
"gender": {
"label": "Gender",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The gender of the character. Use only if not obvious."
},
"title": {
"label": "Title",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Titles the character was known by."
},
"occupation": {
"label": "Occupation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"position": {
"label": "Position",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"class": {
"label": "Class",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character class for RPG characters."
},
"affiliation": {
"label": "Affiliation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The groups or teams the character belongs to."
},
"alignment": {
"label": "Alignment",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's Dungeons & Dragons alignment."
},
"fighting_style": {
"label": "Fighting style",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The primary fighting styles used by the character."
},
"weapon": {
"label": "Weapon",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The types of weapons the character uses."
},
"family": {
"label": "Family",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's family members."
},
"spouse": {
"label": "Spouse",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"spouses": {
"label": "Spouses",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"significant_other": {
"label": "Significant other",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is more than one significant_other, use {{para|significant_others}}."
},
"significant_others": {
"label": "Significant others",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is only one significant_other, use {{para|significant_other}}."
},
"children": {
"label": "Children",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's children"
},
"relatives": {
"label": "Relatives",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's relatives"
},
"religion": {
"label": "Religion",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's religion"
},
"origin": {
"label": "Origin",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"home": {
"label": "Home",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"nationality": {
"label": "Nationality",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's nationality."
},
"lbl21": {
"label": "Label 21",
"description": "Label to display in left column for custom fields under the 2nd header.",
"inherits": "lbl1"
},
"data21": {
"label": "Data 21",
"description": "Text to display in the right column corresponding to lbl21.",
"inherits": "data1"
},
"lbl22": {
"label": "Label 22",
"inherits": "lbl21"
},
"data22": {
"label": "Data 22",
"description": "Text to display in the right column corresponding to lbl22.",
"inherits": "data1"
},
"lbl23": {
"label": "Label 23",
"inherits": "lbl21"
},
"data23": {
"label": "Data 23",
"description": "Text to display in the right column corresponding to lbl23.",
"inherits": "data1"
},
"lbl24": {
"label": "Label 24",
"inherits": "lbl21"
},
"data24": {
"label": "Data 24",
"description": "Text to display in the right column corresponding to lbl24.",
"inherits": "data1"
},
"lbl25": {
"label": "Label 25",
"inherits": "lbl21"
},
"data25": {
"label": "Data 25",
"description": "Text to display in the right column corresponding to lbl25.",
"inherits": "data1"
},
"extra-hdr": {
"label": "Third header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in third header (default = No third header)."
},
"lbl31": {
"label": "Label 31",
"description": "Label to display in left column for custom fields under the 3rd header.",
"inherits": "lbl22"
},
"data31": {
"label": "Data 31",
"description": "Text to display in the right column corresponding to lbl31.",
"inherits": "data1"
},
"lbl32": {
"label": "Label 32",
"inherits": "lbl31"
},
"data32": {
"label": "Data 32",
"description": "Text to display in the right column corresponding to lbl32.",
"inherits": "data1"
},
"lbl33": {
"label": "Label 33",
"inherits": "lbl31"
},
"data33": {
"label": "Data 33",
"description": "Text to display in the right column corresponding to lbl33.",
"inherits": "data1"
},
"lbl34": {
"label": "Label 34",
"inherits": "lbl31"
},
"data34": {
"label": "Data 34",
"description": "Text to display in the right column corresponding to lbl34.",
"inherits": "data1"
},
"lbl35": {
"label": "Label 35",
"inherits": "lbl31"
},
"data35": {
"label": "Data 35",
"description": "Text to display in the right column corresponding to lbl35.",
"inherits": "data1"
}
},
"format": "block"
}
</templatedata>
=== All parameters (not for general use) ===
<pre>{{Infobox character
| color = <!-- headers background colour; the foreground colour is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| multiple =
| image =
| image_upright =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| first =
| firstgame =
| last =
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| lbl1 =
| data1 =
| lbl2 =
| data2 =
| lbl3 =
| data3 =
| lbl4 =
| data4 =
| lbl5 =
| data5 =
| noinfo =
| info-hdr =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
| lbl21 =
| data21 =
| lbl22 =
| data22 =
| lbl23 =
| data23 =
| lbl24 =
| data24 =
| lbl25 =
| data25 =
| extra-hdr =
| lbl31 =
| data31 =
| lbl32 =
| data32 =
| lbl33 =
| data33 =
| lbl34 =
| data34 =
| lbl35 =
| data35 =
}}</pre>
== Example ==
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
<syntaxhighlight lang="moin">
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
</syntaxhighlight>
<includeonly>
[[Category:Templates]]
</includeonly>
17c844413773d011e63407792e596c5d8fa14cf4
497
496
2024-02-01T19:53:28Z
Bonclide
2
/* TemplateData */
wikitext
text/x-wiki
{{Documentation subpage}}
'''Infobox character''' is used to create an infobox for a fictional character of any type.
== Usage ==
The blank form immediately below shows the most commonly used fields, and complete instructions are listed further down the page.
{{Infobox character
| name = {{{name}}}
| series = {{{series}}}
| image = {{{image}}}
| alt = {{{alt}}}
| caption = {{{caption}}}
| first_major = {{{first_major}}}
| first_minor = {{{first_minor}}}
| first_date = {{{first_date}}}
| last_major = {{{last_major}}}
| last_minor = {{{last_minor}}}
| last_date = {{{last_date}}}
| creator = {{{creator}}}
| based_on = {{{based_on}}}
| adapted_by = {{{adapted_by}}}
| designer = {{{designer}}}
| portrayer = {{{portrayer}}}
| voice = {{{voice}}}
| motion_actor = {{{motion_actor}}}
| full_name = {{{full_name}}}
| nickname = {{{nickname}}}
| alias = {{{alias}}}
| species = {{{species}}}
| gender = {{{gender}}}
| title = {{{title}}}
| occupation = {{{occupation}}}
| affiliation = {{{affiliation}}}
| fighting_style = {{{fighting_style}}}
| weapon = {{{weapon}}}
| family = {{{family}}}
| spouse = {{{spouse}}}
| significant_other = {{{significant_other}}}
| children = {{{children}}}
| relatives = {{{relatives}}}
| religion = {{{religion}}}
| origin = {{{origin}}}
| nationality = {{{nationality}}}
}}
<syntaxhighlight lang="html" style="overflow:auto">{{Infobox character
| color = <!-- headers background color; the foreground color is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| image =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| first = <!-- Use instead of first_major= etc. when custom or complex formatting is needed. -->
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| last = <!-- Use instead of last_major= etc. when custom or complex formatting is needed. -->
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
}}</syntaxhighlight>
== Parameters ==
All parameters are optional.
{| class="wikitable"
|-
! scope="col" | Parameter
! scope="col" | Notes
|-
! scope="row" | color
| Background color for header bars (default = #DEDEE2). The text color is automatically determined. Must meet AAA compliance standards outlines on [[WP:COLOR]].
|-
! scope="row" | name
| Character name to display in top header (default = PAGENAME).
|-
! scope="row" | series
| Name of the series in which the character appears.
|-
! scope="row" | franchise
| Name of the fictional world or story in which the character appears. Does not italicize title.
|-
! scope="row" | multiple
| Set to yes if the infobox describes more than one character.
|-
! scope="row" | image
| Image of the character. "File:" and wikilinking is not required. i.e. use {{para|image|Example.png}}.
|-
! scope="row" | image_upright
| The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px.
|-
! scope="row" | alt
| Alt text for image
|-
! scope="row" | caption
| A caption explaining the image.
|-
! scope="row" | first_major
| The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | first_minor
| The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | first_issue
| The number of the comic book issue the fictional element first appeared in.
|-
! scope="row" | first_date
| The date of the publication/release of the minor work where the fictional element first appeared in.
|-
! scope="row" | last_major
| The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games.
|-
! scope="row" | last_minor
| The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions.
|-
! scope="row" | last_issue
| The number of the comic book issue the fictional element last appeared in.
|-
! scope="row" | last_date
| The date of the publication/release of the minor work where the fictional element last appeared in.
|-
! scope="row" | first
| First appearance of the character.
|-
! scope="row" | firstgame
| First appearance in a game of the character.
|-
! scope="row" | last
| Last appearance of the character.
|-
! scope="row" | creator
| Name of the individuals who are credited with the creation of the character.
|-
! scope="row" | based_on
| Name of the original character the adaptation is based on. Use this field in conjunction with {{para|adapted_by}}.
|-
! scope="row" | adapted_by
| Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character.
|-
! scope="row" | designer
| Name of the individuals who designed the character.
|-
! scope="row" | portrayer
| Name of the individuals who portrayed the character.
|-
! scope="row" | voice
| Name of the individuals who voiced the character. Should be omitted if the same as "portrayer".
|-
! scope="row" | motion_actor
| Name of the individuals who portrayed the character in motion capture.
|-
! scope="row" | noinfo
| Disable the first "In-universe information" header.
|-
! scope="row" | info-hdr
| Text for display in second header (default = Information).
|-
! scope="row" | full_name
| The character's full name.
|-
! scope="row" | nickname/nicknames
| Any nicknames used by the character.
|-
! scope="row" | alias/aliases
| Any aliases used by the character.
|-
! scope="row" | species/race
| The species or race of the character. Use for non-human characters only.
|-
! scope="row" | gender
| The gender of the character. Use only if not obvious.
|-
! scope="row" | title
| Titles the character was known by.
|-
! scope="row" | occupation/position
| The character's job or role.
|-
! scope="row" | class
| The character class for RPG characters.
|-
! scope="row" | affiliation
| The groups or teams the character belongs to.
|-
! scope="row" | alignment
| The character's Dungeons & Dragons alignment.
|-
! scope="row" | fighting_style
| The primary fighting styles used by the character.
|-
! scope="row" | weapon
| The types of weapons the character uses.
|-
! scope="row" | family
| The character's family members.
|-
! scope="row" | spouse/spouses
| The character's spouses.
|-
! scope="row" | significant_other/significant_others
| The character's significant others.
|-
! scope="row" | children
| The characters's children.
|-
! scope="row" | relatives
| The characters's relatives.
|-
! scope="row" | religion
| The character's religion.
|-
! scope="row" | origin/home
| The character's place of origin.
|-
! scope="row" | nationality
| The character's nationality.
|-
! scope="row" | extra-hdr
| Text for display in third header (default = No third header).
|-
! scope="row" | lbl#
| Label to display in left column where "#" is 1-5, 21-25, or 31-35 for custom fields under the 1st, 2nd, or 3rd headers respectively.
|-
! scope="row" | data#
| Text to display in the right column corresponding to the appropriate "lbl#".
|}
===TemplateData===
<templatedata>
{
"description": "Creates an infobox for a fictional character of any type.",
"params": {
"color": {
"label": "Color",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Background color for header bars (default = #DEDEE2). The text color is automatically computed. Must meet AAA compliance standards outlines on [[WP:COLOR]].",
"aliases": [
"colour"
]
},
"name": {
"label": "Name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Character name to display in top header (default = PAGENAME)."
},
"series": {
"label": "Series",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the series in which the character appears."
},
"franchise": {
"label": "Franchise",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the fictional world or story in which the character appears. Does not italicize title."
},
"multiple": {
"label": "Multiple",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Set to yes if the infobox describes more than one character."
},
"image": {
"label": "Image",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Image of the character. \"File:\" and wikilinking is not required. i.e. use {{para|image|Example.png}}."
},
"image_upright": {
"label": "Image upright",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The image size defaults to frameless (220px). The size should not be set to a value that would result in an image width greater than 270px."
},
"alt": {
"label": "Alt",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Alt text for image per [[WP:MOSALT]]."
},
"caption": {
"label": "Caption",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A caption explaining the image."
},
"first_major": {
"label": "First appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element first appeared in. Major works include TV series, films, books, albums and games."
},
"first_minor": {
"label": "First appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element first appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"first_issue": {
"label": "First appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element first appeared in."
},
"first_date": {
"label": "First appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element first appeared in."
},
"last_major": {
"label": "Last appearance major",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the major work the fictional element last appeared in. Major works include TV series, films, books, albums and games."
},
"last_minor": {
"label": "Last appearance minor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The title of the minor work the fictional element last appeared in. Minor works include TV episodes, chapters, songs and game missions."
},
"last_issue": {
"label": "Last appearance issue",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The number of the comic book issue the fictional element last appeared in."
},
"last_date": {
"label": "Last appearance date",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The date of the publication/release of the minor work where the fictional element last appeared in."
},
"first": {
"label": "First appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance of the character."
},
"firstgame": {
"label": "First game",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "First appearance in a game of the character."
},
"last": {
"label": "Last appearance",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Last appearance of the character."
},
"creator": {
"label": "Creator",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who are credited with the creation of the character."
},
"based_on": {
"label": "Based on",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the original character the adaptation is based on.."
},
"adapted_by": {
"label": "Adapted by",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who adapted the character into a new medium. Use this field if the character in a medium is based on a character from a different medium, such as a character on television based on a comic book character."
},
"designer": {
"label": "Designer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who designed the character."
},
"portrayer": {
"label": "Portrayer",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character."
},
"voice": {
"label": "Voice actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who voiced the character (if different from portrayer or there is no portrayer)"
},
"motion_actor": {
"label": "Motion actor",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Name of the individuals who portrayed the character in motion capture."
},
"lbl1": {
"label": "Label 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Label to display in left column for custom fields under the 1st header."
},
"data1": {
"label": "Data 1",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text to display in the right column corresponding to lbl1."
},
"lbl2": {
"label": "Label 2",
"inherits": "lbl1"
},
"data2": {
"label": "Data 2",
"description": "Text to display in the right column corresponding to lbl2.",
"inherits": "data1"
},
"lbl3": {
"label": "Label 3",
"inherits": "lbl1"
},
"data3": {
"label": "Data 3",
"description": "Text to display in the right column corresponding to lbl3.",
"inherits": "data1"
},
"lbl4": {
"label": "Label 4",
"inherits": "lbl1"
},
"data4": {
"label": "Data 4",
"description": "Text to display in the right column corresponding to lbl4.",
"inherits": "data1"
},
"lbl5": {
"label": "Label 5",
"inherits": "lbl1"
},
"data5": {
"label": "Data 5",
"description": "Text to display in the right column corresponding to lbl5.",
"inherits": "data1"
},
"noinfo": {
"label": "Disable second header",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Disable the first \"In-universe information\" header."
},
"info-hdr": {
"label": "Second header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in second header (default = Information)."
},
"full_name": {
"label": "Full name",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's full name."
},
"nickname": {
"label": "Nickname",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "A nickname used by the character. If there is more than one nickname, use {{para|nicknames}}."
},
"nicknames": {
"label": "Nicknames",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any nicknames used by the character. If there is only one nickname, use {{para|nickname}}."
},
"alias": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "An alias used by the character. If there is more than one alias, use {{para|aliases}}."
},
"aliases": {
"label": "Alias",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Any aliases used by the character. If there is only one alias, use {{para|alias}}."
},
"species": {
"label": "Species",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The species of the character. Use for non-human characters only."
},
"race": {
"label": "Race",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The race of the character. Use for non-human characters only."
},
"gender": {
"label": "Gender",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The gender of the character. Use only if not obvious."
},
"title": {
"label": "Title",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Titles the character was known by."
},
"occupation": {
"label": "Occupation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"position": {
"label": "Position",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's job or role."
},
"class": {
"label": "Class",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character class for RPG characters."
},
"affiliation": {
"label": "Affiliation",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The groups or teams the character belongs to."
},
"alignment": {
"label": "Alignment",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's Dungeons & Dragons alignment."
},
"fighting_style": {
"label": "Fighting style",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The primary fighting styles used by the character."
},
"weapon": {
"label": "Weapon",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The types of weapons the character uses."
},
"family": {
"label": "Family",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's family members."
},
"spouse": {
"label": "Spouse",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"spouses": {
"label": "Spouses",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's spouses."
},
"significant_other": {
"label": "Significant other",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is more than one significant_other, use {{para|significant_others}}."
},
"significant_others": {
"label": "Significant others",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's significant others. If there is only one significant_other, use {{para|significant_other}}."
},
"children": {
"label": "Children",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's children"
},
"relatives": {
"label": "Relatives",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The characters's relatives"
},
"religion": {
"label": "Religion",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's religion"
},
"origin": {
"label": "Origin",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"home": {
"label": "Home",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's place of origin."
},
"nationality": {
"label": "Nationality",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "The character's nationality."
},
"lbl21": {
"label": "Label 21",
"description": "Label to display in left column for custom fields under the 2nd header.",
"inherits": "lbl1"
},
"data21": {
"label": "Data 21",
"description": "Text to display in the right column corresponding to lbl21.",
"inherits": "data1"
},
"lbl22": {
"label": "Label 22",
"inherits": "lbl21"
},
"data22": {
"label": "Data 22",
"description": "Text to display in the right column corresponding to lbl22.",
"inherits": "data1"
},
"lbl23": {
"label": "Label 23",
"inherits": "lbl21"
},
"data23": {
"label": "Data 23",
"description": "Text to display in the right column corresponding to lbl23.",
"inherits": "data1"
},
"lbl24": {
"label": "Label 24",
"inherits": "lbl21"
},
"data24": {
"label": "Data 24",
"description": "Text to display in the right column corresponding to lbl24.",
"inherits": "data1"
},
"lbl25": {
"label": "Label 25",
"inherits": "lbl21"
},
"data25": {
"label": "Data 25",
"description": "Text to display in the right column corresponding to lbl25.",
"inherits": "data1"
},
"extra-hdr": {
"label": "Third header text",
"type": "string",
"required": false,
"suggested": false,
"deprecated": false,
"description": "Text for display in third header (default = No third header)."
},
"lbl31": {
"label": "Label 31",
"description": "Label to display in left column for custom fields under the 3rd header.",
"inherits": "lbl22"
},
"data31": {
"label": "Data 31",
"description": "Text to display in the right column corresponding to lbl31.",
"inherits": "data1"
},
"lbl32": {
"label": "Label 32",
"inherits": "lbl31"
},
"data32": {
"label": "Data 32",
"description": "Text to display in the right column corresponding to lbl32.",
"inherits": "data1"
},
"lbl33": {
"label": "Label 33",
"inherits": "lbl31"
},
"data33": {
"label": "Data 33",
"description": "Text to display in the right column corresponding to lbl33.",
"inherits": "data1"
},
"lbl34": {
"label": "Label 34",
"inherits": "lbl31"
},
"data34": {
"label": "Data 34",
"description": "Text to display in the right column corresponding to lbl34.",
"inherits": "data1"
},
"lbl35": {
"label": "Label 35",
"inherits": "lbl31"
},
"data35": {
"label": "Data 35",
"description": "Text to display in the right column corresponding to lbl35.",
"inherits": "data1"
},
"appears_in": {
"label": "Appears in",
"description": "Where the character appears in",
"type": "string"
}
},
"format": "block",
"paramOrder": [
"color",
"name",
"series",
"franchise",
"multiple",
"image",
"image_upright",
"alt",
"caption",
"appears_in",
"first_major",
"first_minor",
"first_issue",
"first_date",
"last_major",
"last_minor",
"last_issue",
"last_date",
"first",
"firstgame",
"last",
"creator",
"based_on",
"adapted_by",
"designer",
"portrayer",
"voice",
"motion_actor",
"lbl1",
"data1",
"lbl2",
"data2",
"lbl3",
"data3",
"lbl4",
"data4",
"lbl5",
"data5",
"noinfo",
"info-hdr",
"full_name",
"nickname",
"nicknames",
"alias",
"aliases",
"species",
"race",
"gender",
"title",
"occupation",
"position",
"class",
"affiliation",
"alignment",
"fighting_style",
"weapon",
"family",
"spouse",
"spouses",
"significant_other",
"significant_others",
"children",
"relatives",
"religion",
"origin",
"home",
"nationality",
"lbl21",
"data21",
"lbl22",
"data22",
"lbl23",
"data23",
"lbl24",
"data24",
"lbl25",
"data25",
"extra-hdr",
"lbl31",
"data31",
"lbl32",
"data32",
"lbl33",
"data33",
"lbl34",
"data34",
"lbl35",
"data35"
]
}
</templatedata>
=== All parameters (not for general use) ===
<pre>{{Infobox character
| color = <!-- headers background colour; the foreground colour is automatically computed -->
| name =
| series = <!-- or |franchise=; use without the italic on the outside -->
| multiple =
| image =
| image_upright =
| alt =
| caption =
| first_major = <!-- per [[MOS:MAJORWORK]] - major works include TV series, films, books, albums and games -->
| first_minor = <!-- or |first_issue=; Per [[MOS:MINORWORK]] - minor works include TV episodes, chapters, songs and game missions -->
| first_date =
| last_major =
| last_minor = <!-- or |last_issue= -->
| last_date =
| first =
| firstgame =
| last =
| creator = <!-- only the credited creators; use adapted_by= for adaptations -->
| based_on = <!-- if not an original creation, use {{based on|character|author}} -->
| adapted_by = <!-- for character adaption articles -->
| designer =
| portrayer =
| voice =
| motion_actor =
| lbl1 =
| data1 =
| lbl2 =
| data2 =
| lbl3 =
| data3 =
| lbl4 =
| data4 =
| lbl5 =
| data5 =
| noinfo =
| info-hdr =
| full_name =
| nickname = <!-- or |nicknames= -->
| alias = <!-- or |aliases= -->
| species = <!-- or |race=; for non-humans only -->
| gender = <!-- if not obvious -->
| title =
| occupation = <!-- or |position= or |class= -->
| affiliation = <!-- or |alignment= -->
| fighting_style =
| weapon =
| family =
| spouse = <!-- or |spouses= -->
| significant_other = <!-- or |significant_others= -->
| children =
| relatives =
| religion =
| origin = <!-- or |home= -->
| nationality =
| lbl21 =
| data21 =
| lbl22 =
| data22 =
| lbl23 =
| data23 =
| lbl24 =
| data24 =
| lbl25 =
| data25 =
| extra-hdr =
| lbl31 =
| data31 =
| lbl32 =
| data32 =
| lbl33 =
| data33 =
| lbl34 =
| data34 =
| lbl35 =
| data35 =
}}</pre>
== Example ==
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
<syntaxhighlight lang="moin">
{{Infobox character
| name = John Doe
| series = [[Criminal Minds]]
| image =
| caption =
| first_major = Criminal Minds
| first_minor = Pilot
| first_date = 2005
| last_major = Criminal Minds
| last_minor = Last One
| last_date = 2018
| creator = [[Agnes Nixon]]
| portrayer = [[Soupy Sales]]
| nickname = Doeboy
| alias = Jack Dew
| gender = Male
| title = Detective
| occupation = Law enforcement
| family = Doe
| spouse = Jane Doe
| significant_other =
| children = John Doe, Jr.
| relatives = Phil Doe (father), Nancy Doe (mother)
| religion = [[Christianity|Christian]]
| nationality = American
}}
</syntaxhighlight>
<includeonly>
[[Category:Templates]]
</includeonly>
312a91b488a51bb1bc4fe6a58ddcc6d338823030
Template:If empty/doc
10
127
248
247
2024-02-01T19:43:39Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
This template is used inside other templates. It takes any number of parameters and returns the first found to be defined and non-empty. If none is found, nothing is returned. By writing <code><nowiki>{{if empty|a|b|c}}</nowiki></code> instead of <code><nowiki>{{#if:a|a|{{#if:b|b|c}}}}</nowiki></code>, expression a and b do not have to be repeated and evaluated twice. The template provides a fallback order, similar to a try catch based "It is easier to ask for forgiveness than permission" programming style.
Typical usage is like this:
: <code><nowiki>{{If empty |{{{logo|}}} |{{{image|}}} |{{{picture|}}} |default.svg}}</nowiki></code>
: <nowiki>("Return {{{logo|}}} if it has a value; else {{{image|}}} if it has a value; else {{{picture|}}} if it has a value; else return "default.svg".")</nowiki>
This returns the first of the parameters ''logo'', ''image'' and ''picture'' that is defined and non-empty, otherwise "default.svg".
===Rationale===
The MediaWiki parameter default function doesn't return the default value for empty parameters. That is, <code><nowiki>{{{logo|default.svg}}}</nowiki></code> does not return "default.svg" if the template was called like this: <code><nowiki>{{template|logo=}}</nowiki></code>.
The usual workaround for a single parameter is:
: <code><nowiki>{{#if:{{{logo|}}} |{{{logo}}} |default.svg}}</nowiki></code>
: <nowiki>("If {{{logo}}} has a value, return it, else return "default.svg".")</nowiki>
But this becomes complex when several parameters are to be checked:
: <code><nowiki>{{#if:{{{logo|}}} |{{{logo}}} |{{#if:{{{image|}}} |{{{image}}} |{{#if:{{{picture|}}} |{{{picture}}} |default.svg}} }} }}</nowiki></code>
: <nowiki>("If {{{logo}}} has a value, return it; else if {{{image}}} has a value, return that; else if {{{picture}}} has a value, return that; else return "default.svg".")</nowiki>
In these cases, {{tl|if empty}} produces the simpler syntax (as above):
: <code><nowiki>{{if empty |{{{logo|}}} |{{{image|}}} |{{{picture|}}} |default.svg}}</nowiki></code>
====Piping====
Parameters used with {{tl|if empty}} must be piped – i.e. include the vertical bar (pipe) symbol (" | ") as a trailing character – so that empty or undefined parameters aren't treated as text and returned incorrectly. Hence, for example, <code><nowiki>{{{logo|}}}</nowiki></code>, <code><nowiki>{{{image|}}}</nowiki></code> and <code><nowiki>{{{picture|}}}</nowiki></code> rather than {{para|logo}}, {{para|image}} and {{para|picture}} in the above examples.
===Examples===
* {{tlx|if empty}}-> Returns an empty string.
* {{tlx|if empty|one}} -> {{if empty|one}} Returns the first parameter that is defined and not empty.
* {{tlx|if empty|one|two}} > {{if empty|one|two}}
* {{tlx|if empty|one|two|three|four}} -> {{if empty|one|two|three|four}}
* {{tlx|if empty||two}} -? {{if empty||two}} The first parameter is empty/undefined, so is passed over.
* {{tlx|if empty||two|three|four}} -> {{if empty||two|three|four}}
* {{tlx|if empty||two||four}} -> {{if empty||two||four}} |
* {{tlx|if empty{{!}}}} -> The only parameter is empty or undefined, so returns an empty string.
* {{tlx|if empty|{{!}}{{!}}{{!}}{{!}}}} -> {{if empty||||}} Returns an empty string.
* <code><nowiki>{{if empty|{{{1|}}}|{{{2|}}}|three}}</nowiki></code> -> {{if empty|{{{1|}}}|{{{2|}}}|three}}
* <code><nowiki>{{if empty|{{{1}}}|{{{2}}}|three}}</nowiki></code> -> {{if empty|{{{1}}}|{{{2}}}|three}} (No pipe-characters following the names of the first two parameters ("1" and "2"), so the first of these returned as text ("{{{1}}}")).
* <code><nowiki>{{if empty|{{{logo|}}}|two}}</nowiki></code> -> {{if empty|{{{logo|}}}|two}}
* <code><nowiki>{{if empty|{{{logo}}}|two}}</nowiki></code> -> {{if empty|{{{logo}}}|two}} (No pipe-character following the parameter name "logo", so the text "{{{logo}}}" returned.)
* <code><nowiki>{{if empty|p=q}}</nowiki></code> -> {{if empty|p=q}} (The template identifies the parameters it receives as parameters 1 to 9, not using names such as "p", etc.)
<includeonly>
[[Category:Templates]]
</includeonly>
75e5d5cddcaf1ba848805c14282fb1f2177d36ac
Template:USERNAME/doc
10
128
250
249
2024-02-01T19:43:40Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
== Usage ==
Dear {{USERNAME}},
If you want to show the user name of the person who is reading the article, like you do now, put the following pre-set in the place where you want the reader to be addressed:
<nowiki>{{USERNAME}}</nowiki>
==What is needed==
The following code needs to be added to [[MediaWiki:Common.js]]
<syntaxhighlight lang="javascript">
// Username script //
(function () {
if (mw.config.get('wgUserName') !== null) $('span.insertusername').text(mw.config.get('wgUserName'));
})();
</syntaxhighlight>
<small><small>Source: [https://thecodex.wiki/MediaWiki:Common.js thecodex.wiki]</small></small>
<includeonly>
<!-- Categories below this line -->
[[Category:Templates|USERNAME]]</includeonly>
90c218f47158f242fa736059aa5e79d66d424f66
Template:Sp/doc
10
129
252
251
2024-02-01T19:43:40Z
Bonclide
2
1 revision imported
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
== Usage ==
{{tlx|sp}} will insert a single, ordinary space character, using the numeric character reference <code>&#32;</code>. It is a more readable alternative to using that code.
=== Anywhere you need a regular space ===
You can use {{tl|sp}} anywhere you need a regular, breaking space.
=== Inserting a space inside a parser function ===
Sometimes when using [[mw:Help:parser functions|parser functions]], you need to insert a space at the beginning or end of an optional message. {{tl|sp}} can be used for that purpose. In the following examples, look closely at the spacing between words and punctuation to see the subtle differences.
;Example
<nowiki>I like green{{#if:{{{blue|}}}|and blue}}.</nowiki>
The above example works fine if 'blue' does not have a value ('<code>I like green.</code>').
However, if 'blue' is set to true (<code>|blue=true</code>), then the message is incorrectly run together ('<code>I like greenand blue.</code>').
<nowiki>I like green {{#if:{{{blue|}}}|and blue}}.</nowiki>
Adding the space between 'green' and '{{#if' avoids running the '<code>green and</code>' together, but now there will be an extra space if 'blue' is not set ('<code>I like green .</code>').
<nowiki>I like green{{#if:{{{blue|}}}| and blue}}.</nowiki>
Adding the space between the pipe ('|') and the word 'and' doesn't work. Any leading or trailing spaces from a parser function output are stripped, so this produces exactly the same output as the first example when 'blue' is true ('<code>I like greenand blue.</code>').
<nowiki>I like green{{#if:{{{blue|}}}|{{sp}}and blue}}.</nowiki>
This one works! By inserting the {{tl|sp}} in the parser function output, the space is not stripped, and the correct output is given whether blue is set to true ('<code>I like green and blue.</code>') or not set at all ('<code>I like green.</code>').
=== Disabling default substitution ===
Suppose you have a template, {{tl|Example}}, that uses substitution, like this:
<nowiki>{{{{{subst|subst:}}}#if{{{condition|}}}|message}}</nowiki>
When the template is transcluded and saved, the result would be interpreted as:
<nowiki>{{subst:#if{{{condition|}}}|message}}</nowiki>
You could override the substitution by setting the 'subst' attribute to {{tl|sp}}:
<nowiki>{{Example| subst={{sp}} }}</nowiki>
Now the result would be interpreted as:
<nowiki>{{ #if{{{condition|}}}|message}}</nowiki>
The extra blank space preceding the '#if' would not affect the template at all (except to suppress the default substitution).
== TemplateData ==
<templatedata>
{
"params": {},
"description": "Inserts a single space character; mainly used in parser functions",
"format": "inline"
}
</templatedata>
<includeonly>
[[Category:templates]]
</includeonly>
3ab3e278247cef6eeb81bc2fe4abe6883a4315a6
Baldi
0
2
498
34
2024-02-01T19:53:44Z
Bonclide
2
wikitext
text/x-wiki
{{Infobox character|name=Baldi}}
'''Baldi''' is the main character in Baldi's Basics in Special Things; which explains why the game is based entirely on him.
== Appearance ==
He appears as an adult with one brown strand of hair and two brown eyebrows, along with his iconic green shirt and blue pants. He also has red lips.
== Mechanics ==
=== Tutor Mode ===
When he is in tutor mode, he does nothing but stand and greet you upon entering the schoolhouse.
=== '''Chaser Mode''' ===
When he's in chaser mode, he chases you with his ruler. When he catches you, you will die and lose a life, depending on the mode you're in.
== Gallery ==
<gallery>
File:BaldiPhone.gif|An unused image of Baldi when attracted to the megaphone.
File:BaldiAnnoyedTalk.gif|Seen in the Normal Ending of Gather Mode and in the ending of The Bunker
File:BaldiYCTPSTalk.gif|Baldi holding his You can Think Pads in Story mode when getting all the thinkpads for him.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
b56f58e3adb32dcfd3f9ce97a98e89995963cd9f
Baldi
0
2
499
498
2024-02-01T19:54:55Z
Bonclide
2
wikitext
text/x-wiki
'''Baldi''' is the main character in Baldi's Basics in Special Things; which explains why the game is based entirely on him.
== Appearance ==
He appears as an adult with one brown strand of hair and two brown eyebrows, along with his iconic green shirt and blue pants. He also has red lips.
== Mechanics ==
=== Tutor Mode ===
When he is in tutor mode, he does nothing but stand and greet you upon entering the schoolhouse.
=== '''Chaser Mode''' ===
When he's in chaser mode, he chases you with his ruler. When he catches you, you will die and lose a life, depending on the mode you're in.
== Gallery ==
<gallery>
File:BaldiPhone.gif|An unused image of Baldi when attracted to the megaphone.
File:BaldiAnnoyedTalk.gif|Seen in the Normal Ending of Gather Mode and in the ending of The Bunker
File:BaldiYCTPSTalk.gif|Baldi holding his You can Think Pads in Story mode when getting all the thinkpads for him.
</gallery>
[[Category:Characters]]
[[Category:Day-Time Characters]]
65fc32ae11cf07da6adf173bad5b6f6cf2691b90
Template:Infobox character
10
19
500
36
2024-02-01T20:12:56Z
Bonclide
2
wikitext
text/x-wiki
{{Infobox
| bodystyle = border-spacing: 2px 5px;
| above = {{If empty |{{{name|}}} |<includeonly>{{PAGENAMEBASE}}</includeonly> }}
| abovestyle = background: {{If empty |{{{color|}}} |{{{colour|}}} |#DEDEE2 }}; {{#if: {{{color|}}}{{{colour|}}} | color: {{Greater color contrast ratio|{{If empty |{{{color|}}} |{{{colour|}}} }}|black|white }}; }}
| subheader = {{#if: {{{series|}}}{{{franchise|}}} | {{#if: {{{series|}}} | ''{{{series|}}}'' | {{{franchise|}}} }} character{{#if: {{{multiple|}}} | s }} }}
| image = {{{image|}}}|
| caption = {{{caption|}}}
| headerstyle = background: {{If empty |{{{color|}}} |{{{colour|}}} |#DEDEE2 }}; {{#if: {{{color|}}}{{{colour|}}} |color: {{Greater color contrast ratio|{{If empty |{{{color|}}} |{{{colour|}}} }}|black|white }}; }}
| label1 = First appearance
| data1 = {{#if: {{{first|}}} | {{{first|}}} | {{#invoke:Formatted appearance|getFormattedAppearance|major_work={{{first_major|}}} |minor_work={{{first_minor|}}} |issue={{{first_issue|}}} |date={{{first_date|}}} }} }}
| label2 = First game
| data2 = {{{firstgame|}}}
| label3 = Last appearance
| data3 = {{#if: {{{last|}}} | {{{last|}}} | {{#invoke:Formatted appearance|getFormattedAppearance|major_work={{{last_major|}}} |minor_work={{{last_minor|}}} |issue={{{last_issue|}}} |date={{{last_date|}}} }} }}
| label4 = Created by
| data4 = {{{creator|}}}
| label5 = Based on
| data5 = {{{based_on|}}}
| label6 = Adapted by
| data6 = {{{adapted_by|}}}
| label7 = Designed by
| data7 = {{{designer|}}}
| label8 = Portrayed by
| data8 = {{{portrayer|}}}
| label9 = Voiced by
| data9 = {{{voice|}}}
| label10 = Motion capture
| data10 = {{{motion_actor|}}}
| label11 = {{{lbl1|}}}
| data11 = {{{data1|}}}
| label12 = {{{lbl2|}}}
| data12 = {{{data2|}}}
| label13 = {{{lbl3|}}}
| data13 = {{{data3|}}}
| label14 = {{{lbl4|}}}
| data14 = {{{data4|}}}
| label15 = {{{lbl5|}}}
| data15 = {{{data5|}}}
| header20 = {{#if: {{{noinfo|}}} || {{#if: {{{full_name|}}} {{{alias|}}} {{{aliases|}}} {{{nickname|}}} {{{nicknames|}}} {{{race|}}} {{{species|}}} {{{gender|}}} {{{title|}}} {{{occupation|}}} {{{position|}}} {{{class|}}} {{{affiliation|}}} {{{alignment|}}} {{{fighting_style|}}} {{{weapon|}}} {{{family|}}} {{{spouse|}}} {{{spouses|}}} {{{significant_other|}}} {{{significant_others|}}} {{{children|}}} {{{relatives|}}} {{{religion|}}} {{{origin|}}} {{{home|}}} {{{nationality|}}} {{{data21|}}} {{{data22|}}} {{{data23|}}} {{{data24|}}} {{{data25|}}} | {{If empty |{{{info-hdr|}}} |In-universe information }} }} }}
| label21 = Full name
| data21 = {{{full_name|}}}
| label22 = {{#if: {{{alias|}}} | Alias | Aliases }}
| data22 = {{If empty |{{{alias|}}} |{{{aliases|}}} }}
| label23 = {{#if: {{{nickname|}}} | Nickname | Nicknames }}
| data23 = {{If empty |{{{nickname|}}} |{{{nicknames|}}} }}
| label24 = {{#if: {{{race|}}} | Race | Species }}
| data24 = {{If empty |{{{race|}}} |{{{species|}}} }}
| label25 = Gender
| data25 = {{{gender|}}}
| label26 = Title
| data26 = {{{title|}}}
| label27 = {{#if: {{{occupation|}}} | Occupation | {{#if: {{{position|}}} | Position | Class }} }}
| data27 = {{If empty |{{{occupation|}}} |{{{position|}}} |{{{class|}}} }}
| label28 = {{#if: {{{affiliation|}}} | Affiliation | Alignment }}
| data28 = {{If empty |{{{affiliation|}}} |{{{alignment|}}} }}
| label29 = Fighting style
| data29 = {{{fighting_style|}}}
| label30 = Weapon
| data30 = {{{weapon|}}}
| label31 = Family
| data31 = {{{family|}}}
| label32 = {{#if: {{{spouse|}}} | Spouse | Spouses }}
| data32 = {{If empty |{{{spouse|}}} |{{{spouses|}}} }}
| label33 = {{#if: {{{significant_other|}}} | Significant other | Significant others }}
| data33 = {{If empty |{{{significant_other|}}} |{{{significant_others|}}} }}
| label34 = Children
| data34 = {{{children|}}}
| label35 = Relatives
| data35 = {{{relatives|}}}
| label36 = Religion
| data36 = {{{religion|}}}
| label37 = {{#if: {{{origin|}}} | Origin | Home }}
| data37 = {{If empty |{{{origin|}}} |{{{home|}}} }}
| label38 = Nationality
| data38 = {{{nationality|}}}
| label39 = {{{lbl21|}}}
| data39 = {{{data21|}}}
| label40 = {{{lbl22|}}}
| data40 = {{{data22|}}}
| label41 = {{{lbl23|}}}
| data41 = {{{data23|}}}
| label42 = {{{lbl24|}}}
| data42 = {{{data24|}}}
| label43 = {{{lbl25|}}}
| data43 = {{{data25|}}}
| header50 = {{#if: {{{data31|}}} {{{data32|}}} {{{data33|}}} {{{data34|}}} {{{data35|}}} | {{{extra-hdr|}}} }}
| label51 = {{{lbl31|}}}
| data51 = {{{data31|}}}
| label52 = {{{lbl32|}}}
| data52 = {{{data32|}}}
| label53 = {{{lbl33|}}}
| data53 = {{{data33|}}}
| label54 = {{{lbl34|}}}
| data54 = {{{data34|}}}
| label55 = {{{lbl35|}}}
| data55 = {{{data35|}}}
}}<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here! -->
<templatedata>
{
"params": {
"name": {},
"color": {},
"colour": {},
"series": {},
"franchise": {},
"multiple": {},
"image": {},
"caption": {},
"first": {},
"first_major": {},
"first_minor": {},
"first_issue": {},
"first_date": {},
"firstgame": {},
"last": {},
"last_major": {},
"last_minor": {},
"last_issue": {},
"last_date": {},
"creator": {},
"based_on": {},
"adapted_by": {},
"designer": {},
"portrayer": {},
"voice": {},
"motion_actor": {},
"lbl1": {},
"data1": {},
"lbl2": {},
"data2": {},
"lbl3": {},
"data3": {},
"lbl4": {},
"data4": {},
"lbl5": {},
"data5": {},
"noinfo": {},
"full_name": {},
"alias": {},
"aliases": {},
"nickname": {},
"nicknames": {},
"race": {},
"species": {},
"gender": {},
"title": {},
"occupation": {},
"position": {},
"class": {},
"affiliation": {},
"alignment": {},
"fighting_style": {},
"weapon": {},
"family": {},
"spouse": {},
"spouses": {},
"significant_other": {},
"significant_others": {},
"children": {},
"relatives": {},
"religion": {},
"origin": {},
"home": {},
"nationality": {},
"data21": {},
"data22": {},
"data23": {},
"data24": {},
"data25": {},
"info-hdr": {},
"lbl21": {},
"lbl22": {},
"lbl23": {},
"lbl24": {},
"lbl25": {},
"data31": {},
"data32": {},
"data33": {},
"data34": {},
"data35": {},
"extra-hdr": {},
"lbl31": {},
"lbl32": {},
"lbl33": {},
"lbl34": {},
"lbl35": {}
}
}
</templatedata></noinclude>
a0b28e23504483c69c8a59f2d65edc1e1165f26c
File:Bbistlogo.png
6
233
501
2024-02-01T21:24:45Z
Bonclide
2
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709